home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume25 / zip / part01 next >
Encoding:
Text File  |  1992-03-01  |  79.6 KB  |  2,681 lines

  1. Newsgroups: comp.sources.unix
  2. From: madler@cco.caltech.edu (Mark Adler)
  3. Subject: v25i142: zip - file compression/archive tool, Part01/07
  4. Sender: unix-sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: madler@cco.caltech.edu (Mark Adler)
  8. Posting-Number: Volume 25, Issue 142
  9. Archive-Name: zip/part01
  10.  
  11. [ I removed all the ^M's from the various files that had them, and I
  12.   renamed "readme" to "README" to match the c.s.unix convention.  The
  13.   blurb below is from the man page.                --vix ]
  14.  
  15. NAME
  16.      zip - package and compress (archive) files
  17.  
  18. DESCRIPTION
  19.      Zip is a compression and file packaging utility for Unix,
  20.      MSDOS, OS/2, and VMS.  It is analogous to a combination of
  21.      tar and compress and is compatible with PKZIP (Phil Katz
  22.      ZIP) for MSDOS systems.
  23.  
  24. #! /bin/sh
  25. # This is a shell archive.  Remove anything before this line, then unpack
  26. # it by saving it into a file and typing "sh file".  To overwrite existing
  27. # files, type "sh file -c".  You can also feed this as standard input via
  28. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  29. # will see the following message at the end:
  30. #        "End of archive 1 (of 7)."
  31. # Contents:  MANIFEST README contents crypt.h dir_os2.c dir_os2.h
  32. #   doturboc.bat globals.c im_bits.c implode.h infozip.who makecrc.c
  33. #   makefile makefile.bor makefile.msc makefile.os2 makefile.pwc
  34. #   makevms.com revision.h ship.def tailor.h tempf.c tempf.h zip.def
  35. #   zip.prj ziperr.h
  36. # Wrapped by vixie@cognition.pa.dec.com on Sun Mar  1 18:57:37 1992
  37. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  38. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  39.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  40. else
  41. echo shar: Extracting \"'MANIFEST'\" \(1429 characters\)
  42. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  43. X   File Name        Archive #    Description
  44. X-----------------------------------------------------------
  45. X MANIFEST                   1    
  46. X README                     1    
  47. X contents                   1    
  48. X crypt.h                    1    
  49. X dir_os2.c                  1    
  50. X dir_os2.h                  1    
  51. X doturboc.bat               1    
  52. X fileio.c                   6    
  53. X globals.c                  1    
  54. X history                    5    
  55. X im_bits.c                  1    
  56. X im_ctree.c                 7    
  57. X im_lm.asm                  2    
  58. X im_lmat.c                  4    
  59. X implode.c                  2    
  60. X implode.h                  1    
  61. X infozip.who                1    
  62. X makecrc.c                  1    
  63. X makefile                   1    
  64. X makefile.bor               1    
  65. X makefile.msc               1    
  66. X makefile.os2               1    
  67. X makefile.pwc               1    
  68. X makevms.com                1    
  69. X revision.h                 1    
  70. X ship.c                     5    
  71. X ship.def                   1    
  72. X shrink.c                   2    
  73. X tailor.h                   1    
  74. X tempf.c                    1    
  75. X tempf.h                    1    
  76. X util.c                     2    
  77. X zip.1                      3    
  78. X zip.c                      4    
  79. X zip.def                    1    
  80. X zip.doc                    4    
  81. X zip.h                      2    
  82. X zip.prj                    1    
  83. X ziperr.h                   1    
  84. X zipfile.c                  3    
  85. X zipnote.c                  2    
  86. X zipsplit.c                 3    
  87. X zipup.c                    2    
  88. END_OF_FILE
  89. if test 1429 -ne `wc -c <'MANIFEST'`; then
  90.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  91. fi
  92. # end of 'MANIFEST'
  93. fi
  94. if test -f 'README' -a "${1}" != "-c" ; then 
  95.   echo shar: Will not clobber existing file \"'README'\"
  96. else
  97. echo shar: Extracting \"'README'\" \(929 characters\)
  98. sed "s/^X//" >'README' <<'END_OF_FILE'
  99. Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  100. Permission is granted to any individual or institution to use, copy, or
  101. redistribute this software so long as all of the original files are included
  102. unmodified, that it is not sold for profit, and that this copyright notice
  103. is retained.
  104. X
  105. LIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES ARE
  106. PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR
  107. IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES
  108. RESULTING FROM THE USE OF THIS SOFTWARE.
  109. X
  110. Please read the file zip.doc for information on how to compile, install, and
  111. use zip, zipcloak (if this is not an export version), zipsplit, zipnote, and
  112. ship.  The file "contents" is a complete list of the files you should have in
  113. this distribution.  Also, if you are using MSDOS, you should read the note on
  114. file formats at the end of the contents file.
  115. END_OF_FILE
  116. if test 929 -ne `wc -c <'README'`; then
  117.     echo shar: \"'README'\" unpacked with wrong size!
  118. fi
  119. # end of 'README'
  120. fi
  121. if test -f 'contents' -a "${1}" != "-c" ; then 
  122.   echo shar: Will not clobber existing file \"'contents'\"
  123. else
  124. echo shar: Extracting \"'contents'\" \(3587 characters\)
  125. sed "s/^X//" >'contents' <<'END_OF_FILE'
  126. Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  127. Permission is granted to any individual or institution to use, copy, or
  128. redistribute this software so long as all of the original files are included
  129. unmodified, that it is not sold for profit, and that this copyright notice
  130. is retained.
  131. X
  132. This file is a complete list of files mentioned in the above copyright.  Some
  133. of the files in this list explicitly state in their text that they are public
  134. domain or not copyrighted.  These files can be distributed separately and are
  135. marked below with asterisks.
  136. X
  137. file            what it is
  138. X----            ----------
  139. contents        This file.
  140. crypt.c         Code for encryption and decryption (not in export version).
  141. crypt.h         Header used in implode modules to access encryption routines.
  142. dir_os2.c       * Directory routines for OS/2.
  143. dir_os2.h       * Definitions of functions in dir_os2.c.
  144. doturboc.bat    Batch file for compiling under Turbo C 2.0.
  145. fileio.c        System dependent routines (most of them anyway).
  146. globals.c       Global variables.
  147. history         List of changes in the versions leading up to this one.
  148. im_bits.c       Output variable-length bit strings.
  149. im_ctree.c      Encode source values using variable-length binary code trees.
  150. im_lm.asm       An 80x86 assembler version of a routine in im_lmat.c.
  151. im_lmat.c       Find redundant text in a sliding window.
  152. implode.c       Implode compression method (calls other im* modules).
  153. implode.h       Definitions of functions external to the im* modules.
  154. infozip.who     List of contributors to the portable Zip project.
  155. makecrc.c       * Generate the CRC table in util.c and shrink.c.
  156. makefile        Unix make file.
  157. makefile.bor    MSDOS Borland C++ make file.
  158. makefile.exp    Export make file (leaves out encryption and zipcloak).
  159. makefile.msc    MSDOS Microsoft C make file.
  160. makefile.os2    OS/2 make file.
  161. makefile.pwc    Power C make file.
  162. makevms.com     VMS command file for compilation.
  163. readme          Short file to point to zip.doc.
  164. revision.h      Contains the program version number and revision date.
  165. ship.c          * Encodes a binary stream into a mailable text stream.
  166. ship.def        OS/2 def file for Ship.
  167. shrink.c        Shrink compression method.
  168. tailor.h        * Tailors the compilation to the system being compiled on.
  169. tempf.c         Temporary memory/file interface.
  170. tempf.h         Definitions of functions in tempf.c.
  171. util.c          Miscellaneous utility routines.
  172. zip.1           Source for the Zip man page (zip.doc).
  173. zip.c           Main routine for Zip.
  174. zip.def         OS/2 def file for Zip.
  175. zip.doc         Documentation for Zip (zip.1 processed).
  176. zip.h           Header for all Zip modules.
  177. zip.prj         Project file for Borland (Turbo) C++.
  178. zipcloak.c      Main routine for ZipCloak.
  179. ziperr.h        Error messages in Zip.
  180. zipfile.c       Zip file format handler.
  181. zipnote.c       Main routine for ZipNote.
  182. zipsplit.c      Main routine for ZipSplit.
  183. zipup.c         Applies shrink and/or implode methods to compress an entry.
  184. X
  185. All of the files are in Unix (LF only) format execpt for the documentation
  186. files, zip.prj, and doturboc.bat.  On MSDOS systems, you can use the -a
  187. option of unzip to convert the source files to CRLF format.  This is only
  188. necessary if you wish to edit the files--they will compile as is with
  189. Microsoft C and Turbo/Borland C++ 1.0 or later.  However, you will have to
  190. convert the files (using unzip -a) to the CRLF format to compile with the
  191. older Turbo C 1.0 or 2.0.  You should be able to find unzip the same place
  192. you found this.
  193. END_OF_FILE
  194. if test 3587 -ne `wc -c <'contents'`; then
  195.     echo shar: \"'contents'\" unpacked with wrong size!
  196. fi
  197. # end of 'contents'
  198. fi
  199. if test -f 'crypt.h' -a "${1}" != "-c" ; then 
  200.   echo shar: Will not clobber existing file \"'crypt.h'\"
  201. else
  202. echo shar: Extracting \"'crypt.h'\" \(1087 characters\)
  203. sed "s/^X//" >'crypt.h' <<'END_OF_FILE'
  204. X/*
  205. X
  206. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  207. X Permission is granted to any individual or institution to use, copy, or
  208. X redistribute this software so long as all of the original files are included
  209. X unmodified, that it is not sold for profit, and that this copyright notice
  210. X is retained.
  211. X
  212. X*/
  213. X
  214. X/*
  215. X *  crypt.h by Mark Adler.
  216. X */
  217. X
  218. X/* Set up portability */
  219. X#include "tailor.h"
  220. X
  221. X/* Define zfwrite() and zputc() functions */
  222. X#ifdef EXPORT
  223. X#  define zfwrite fwrite
  224. X#  define zputc putc
  225. X#else /* !EXPORT */
  226. X   extern int zfwrite OF((voidp *, extent, extent, FILE *));
  227. X   extern int zfputc OF((int, FILE *));
  228. X   extern char *key;
  229. X#  define zputc(b,f) (key!=NULL?zfputc(b,f):putc(b,f))
  230. X#endif /* ?EXPORT */
  231. X
  232. X/* The implode routines now use the same temporary name generator */
  233. char *tempname OF((int));
  234. X
  235. X/* I'm sneaking this in on Rich's code to make my compiler a bit happier */
  236. X#ifdef NeXT
  237. X   extern void free(voidp *);
  238. X   extern voidp *qsort(voidp *, extent, extent, int (*)());
  239. X   extern extent strlen(char *);
  240. X   extern int unlink(char *);
  241. X#endif /* NeXT */
  242. END_OF_FILE
  243. if test 1087 -ne `wc -c <'crypt.h'`; then
  244.     echo shar: \"'crypt.h'\" unpacked with wrong size!
  245. fi
  246. # end of 'crypt.h'
  247. fi
  248. if test -f 'dir_os2.c' -a "${1}" != "-c" ; then 
  249.   echo shar: Will not clobber existing file \"'dir_os2.c'\"
  250. else
  251. echo shar: Extracting \"'dir_os2.c'\" \(5569 characters\)
  252. sed "s/^X//" >'dir_os2.c' <<'END_OF_FILE'
  253. X/*
  254. X * @(#)dir.c 1.4 87/11/06 Public Domain.
  255. X *
  256. X *  A public domain implementation of BSD directory routines for
  257. X *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
  258. X *  August 1897
  259. X *  Ported to OS/2 by Kai Uwe Rommel
  260. X *  December 1989, February 1990
  261. X *  Change for HPFS support, October 1990
  262. X */
  263. X
  264. X#include <sys/types.h>
  265. X#include <sys/stat.h>
  266. X
  267. X#include <stdio.h>
  268. X#include <stdlib.h>
  269. X#include <malloc.h>
  270. X#include <string.h>
  271. X#include <ctype.h>
  272. X
  273. X#define INCL_NOPM
  274. X#include <os2.h>
  275. X
  276. X#include "dir_os2.h"
  277. X
  278. X
  279. int attributes = A_DIR | A_HIDDEN;
  280. X
  281. X
  282. static char *getdirent(char *);
  283. static void free_dircontents(struct _dircontents *);
  284. X
  285. static HDIR hdir;
  286. static USHORT count;
  287. static FILEFINDBUF find;
  288. X
  289. X
  290. DIR *opendir(char *name)
  291. X{
  292. X  struct stat statb;
  293. X  DIR *dirp;
  294. X  char c;
  295. X  char *s;
  296. X  struct _dircontents *dp;
  297. X  char nbuf[MAXPATHLEN + 1];
  298. X  int len;
  299. X
  300. X  strcpy(nbuf, name);
  301. X  len = strlen (nbuf);
  302. X  s = nbuf + len;
  303. X
  304. X#if 1
  305. X  if ( ((c = nbuf[strlen(nbuf) - 1]) == '\\' || c == '/') &&
  306. X       (strlen(nbuf) > 1) )
  307. X  {
  308. X    nbuf[strlen(nbuf) - 1] = 0;
  309. X
  310. X    if ( nbuf[strlen(nbuf) - 1] == ':' )
  311. X      strcat(nbuf, "\\.");
  312. X  }
  313. X  else
  314. X    if ( nbuf[strlen(nbuf) - 1] == ':' )
  315. X      strcat(nbuf, ".");
  316. X#else
  317. X  if ( len && ((c = nbuf[len-1]) == '\\' || c == '/' || c == ':') )
  318. X  {
  319. X    nbuf[len++] = '.';      /* s now points to '.' */
  320. X    nbuf[len] = 0;
  321. X  }
  322. X#endif
  323. X
  324. X  if (stat(nbuf, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR)
  325. X    return NULL;
  326. X
  327. X  if ( (dirp = malloc(sizeof(DIR))) == NULL )
  328. X    return NULL;
  329. X
  330. X#if 1
  331. X  if ( nbuf[strlen(nbuf) - 1] == '.' )
  332. X    strcpy(nbuf + strlen(nbuf) - 1, "*.*");
  333. X  else
  334. X    if ( ((c = nbuf[strlen(nbuf) - 1]) == '\\' || c == '/') &&
  335. X         (strlen(nbuf) == 1) )
  336. X      strcat(nbuf, "*.*");
  337. X    else
  338. X      strcat(nbuf, "\\*.*");
  339. X#else
  340. X  if ( *s == 0 )
  341. X    *s++ = '\\';
  342. X
  343. X  strcpy (s, "*.*");
  344. X#endif
  345. X
  346. X  dirp -> dd_loc = 0;
  347. X  dirp -> dd_contents = dirp -> dd_cp = NULL;
  348. X
  349. X  if ((s = getdirent(nbuf)) == NULL)
  350. X    return dirp;
  351. X
  352. X  do
  353. X  {
  354. X    if (((dp = malloc(sizeof(struct _dircontents))) == NULL) ||
  355. X        ((dp -> _d_entry = malloc(strlen(s) + 1)) == NULL)      )
  356. X    {
  357. X      if (dp)
  358. X        free(dp);
  359. X      free_dircontents(dirp -> dd_contents);
  360. X
  361. X      return NULL;
  362. X    }
  363. X
  364. X    if (dirp -> dd_contents)
  365. X    {
  366. X      dirp -> dd_cp -> _d_next = dp;
  367. X      dirp -> dd_cp = dirp -> dd_cp -> _d_next;
  368. X    }
  369. X    else
  370. X      dirp -> dd_contents = dirp -> dd_cp = dp;
  371. X
  372. X    strcpy(dp -> _d_entry, s);
  373. X    dp -> _d_next = NULL;
  374. X
  375. X    dp -> _d_size = find.cbFile;
  376. X    dp -> _d_mode = find.attrFile;
  377. X    dp -> _d_time = *(unsigned *) &(find.ftimeLastWrite);
  378. X    dp -> _d_date = *(unsigned *) &(find.fdateLastWrite);
  379. X  }
  380. X  while ((s = getdirent(NULL)) != NULL);
  381. X
  382. X  dirp -> dd_cp = dirp -> dd_contents;
  383. X
  384. X  return dirp;
  385. X}
  386. X
  387. X
  388. void closedir(DIR * dirp)
  389. X{
  390. X  free_dircontents(dirp -> dd_contents);
  391. X  free(dirp);
  392. X}
  393. X
  394. X
  395. struct direct *readdir(DIR * dirp)
  396. X{
  397. X  static struct direct dp;
  398. X
  399. X  if (dirp -> dd_cp == NULL)
  400. X    return NULL;
  401. X
  402. X  dp.d_namlen = dp.d_reclen =
  403. X    strlen(strcpy(dp.d_name, dirp -> dd_cp -> _d_entry));
  404. X
  405. X  dp.d_ino = 0;
  406. X
  407. X  dp.d_size = dirp -> dd_cp -> _d_size;
  408. X  dp.d_mode = dirp -> dd_cp -> _d_mode;
  409. X  dp.d_time = dirp -> dd_cp -> _d_time;
  410. X  dp.d_date = dirp -> dd_cp -> _d_date;
  411. X
  412. X  dirp -> dd_cp = dirp -> dd_cp -> _d_next;
  413. X  dirp -> dd_loc++;
  414. X
  415. X  return &dp;
  416. X}
  417. X
  418. X
  419. void seekdir(DIR * dirp, long off)
  420. X{
  421. X  long i = off;
  422. X  struct _dircontents *dp;
  423. X
  424. X  if (off >= 0)
  425. X  {
  426. X    for (dp = dirp -> dd_contents; --i >= 0 && dp; dp = dp -> _d_next);
  427. X
  428. X    dirp -> dd_loc = off - (i + 1);
  429. X    dirp -> dd_cp = dp;
  430. X  }
  431. X}
  432. X
  433. X
  434. long telldir(DIR * dirp)
  435. X{
  436. X  return dirp -> dd_loc;
  437. X}
  438. X
  439. X
  440. static void free_dircontents(struct _dircontents * dp)
  441. X{
  442. X  struct _dircontents *odp;
  443. X
  444. X  while (dp)
  445. X  {
  446. X    if (dp -> _d_entry)
  447. X      free(dp -> _d_entry);
  448. X
  449. X    dp = (odp = dp) -> _d_next;
  450. X    free(odp);
  451. X  }
  452. X}
  453. X
  454. X
  455. static char *getdirent(char *dir)
  456. X{
  457. X  int done;
  458. X
  459. X  if (dir != NULL)
  460. X  {                                    /* get first entry */
  461. X    hdir = HDIR_CREATE;
  462. X    count = 1;
  463. X    done = DosFindFirst(dir, &hdir, attributes,
  464. X                        &find, sizeof(find), &count, 0L);
  465. X  }
  466. X  else                                 /* get next entry */
  467. X    done = DosFindNext(hdir, &find, sizeof(find), &count);
  468. X
  469. X  if (done == 0)
  470. X    return find.achName;
  471. X  else
  472. X  {
  473. X    DosFindClose(hdir);
  474. X    return NULL;
  475. X  }
  476. X}
  477. X
  478. X
  479. X/* ISFAT.C
  480. X *
  481. X * Autor:    Kai Uwe Rommel
  482. X * Datum:    Sun 28-Oct-1990
  483. X *
  484. X * Compiler: MS C ab 6.00
  485. X * System:   OS/2 ab 1.2
  486. X */
  487. X
  488. X#define LABEL    "isfat.c"
  489. X#define VERSION  "1.0"
  490. X
  491. X
  492. X/* #include <stdio.h>
  493. X#include <stdlib.h>
  494. X#include <string.h>
  495. X#include <ctype.h>
  496. X#define INCL_NOPM
  497. X#include <os2.h> */
  498. X
  499. X
  500. int IsFileSystemFAT(char *dir)
  501. X{
  502. X  USHORT nDrive;
  503. X  ULONG lMap;
  504. X  BYTE bData[64], bName[3];
  505. X  USHORT cbData;
  506. X  static USHORT nLastDrive = -1, nResult;
  507. X
  508. X  if ( _osmode == DOS_MODE )
  509. X    return TRUE;
  510. X  else
  511. X  {
  512. X    /* We separate FAT and HPFS+other file systems here.
  513. X       at the moment I consider other systems to be similar to HPFS,
  514. X       i.e. support long file names and beeing case sensitive */
  515. X
  516. X    if ( isalpha(dir[0]) && (dir[1] == ':') )
  517. X      nDrive = toupper(dir[0]) - '@';
  518. X    else
  519. X      DosQCurDisk(&nDrive, &lMap);
  520. X
  521. X    if ( nDrive == nLastDrive )
  522. X      return nResult;
  523. X
  524. X    bName[0] = (char) (nDrive + '@');
  525. X    bName[1] = ':';
  526. X    bName[2] = 0;
  527. X
  528. X    nLastDrive = nDrive;
  529. X    cbData = sizeof(bData);
  530. X
  531. X    if ( !DosQFSAttach(bName, 0U, 1U, bData, &cbData, 0L) )
  532. X      nResult = !strcmp(bData + (*(USHORT *) (bData + 2) + 7), "FAT");
  533. X    else
  534. X      nResult = FALSE;
  535. X
  536. X    /* End of this ugly code */
  537. X    return nResult;
  538. X  }
  539. X}
  540. X
  541. X
  542. X
  543. X/* End of ISFAT.C */
  544. END_OF_FILE
  545. if test 5569 -ne `wc -c <'dir_os2.c'`; then
  546.     echo shar: \"'dir_os2.c'\" unpacked with wrong size!
  547. fi
  548. # end of 'dir_os2.c'
  549. fi
  550. if test -f 'dir_os2.h' -a "${1}" != "-c" ; then 
  551.   echo shar: Will not clobber existing file \"'dir_os2.h'\"
  552. else
  553. echo shar: Extracting \"'dir_os2.h'\" \(1975 characters\)
  554. sed "s/^X//" >'dir_os2.h' <<'END_OF_FILE'
  555. X/*
  556. X * @(#) dir.h 1.4 87/11/06   Public Domain.
  557. X *
  558. X *  A public domain implementation of BSD directory routines for
  559. X *  MS-DOS.  Written by Michael Rendell ({uunet,utai}michael@garfield),
  560. X *  August 1987
  561. X *
  562. X *  Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype
  563. X *  December 1989, February 1990
  564. X *  Change of MAXPATHLEN for HPFS, October 1990
  565. X */
  566. X
  567. X
  568. X#define MAXNAMLEN  256
  569. X#define MAXPATHLEN 256
  570. X
  571. X#define A_RONLY    0x01
  572. X#define A_HIDDEN   0x02
  573. X#define A_SYSTEM   0x04
  574. X#define A_LABEL    0x08
  575. X#define A_DIR      0x10
  576. X#define A_ARCHIVE  0x20
  577. X
  578. X
  579. struct direct
  580. X{
  581. X  ino_t    d_ino;                   /* a bit of a farce */
  582. X  int      d_reclen;                /* more farce */
  583. X  int      d_namlen;                /* length of d_name */
  584. X  char     d_name[MAXNAMLEN + 1];   /* null terminated */
  585. X  /* nonstandard fields */
  586. X  long     d_size;                  /* size in bytes */
  587. X  unsigned d_mode;                  /* DOS or OS/2 file attributes */
  588. X  unsigned d_time;
  589. X  unsigned d_date;
  590. X};
  591. X
  592. X/* The fields d_size and d_mode are extensions by me (Kai Uwe Rommel).
  593. X * The find_first and find_next calls deliver this data without any extra cost.
  594. X * If this data is needed, these fields save a lot of extra calls to stat() 
  595. X * (each stat() again performs a find_first call !).
  596. X */
  597. X
  598. struct _dircontents
  599. X{
  600. X  char *_d_entry;
  601. X  long _d_size;
  602. X  unsigned _d_mode, _d_time, _d_date;
  603. X  struct _dircontents *_d_next;
  604. X};
  605. X
  606. typedef struct _dirdesc
  607. X{
  608. X  int  dd_id;                   /* uniquely identify each open directory */
  609. X  long dd_loc;                  /* where we are in directory entry is this */
  610. X  struct _dircontents *dd_contents;   /* pointer to contents of dir */
  611. X  struct _dircontents *dd_cp;         /* pointer to current position */
  612. X}
  613. DIR;
  614. X
  615. X
  616. extern int attributes;
  617. X
  618. extern DIR *opendir(char *);
  619. extern struct direct *readdir(DIR *);
  620. extern void seekdir(DIR *, long);
  621. extern long telldir(DIR *);
  622. extern void closedir(DIR *);
  623. X#define rewinddir(dirp) seekdir(dirp, 0L)
  624. END_OF_FILE
  625. if test 1975 -ne `wc -c <'dir_os2.h'`; then
  626.     echo shar: \"'dir_os2.h'\" unpacked with wrong size!
  627. fi
  628. # end of 'dir_os2.h'
  629. fi
  630. if test -f 'doturboc.bat' -a "${1}" != "-c" ; then 
  631.   echo shar: Will not clobber existing file \"'doturboc.bat'\"
  632. else
  633. echo shar: Extracting \"'doturboc.bat'\" \(574 characters\)
  634. sed "s/^X//" >'doturboc.bat' <<'END_OF_FILE'
  635. X: This file is a complement to zip.prj for Turbo C 2.0 users.
  636. X: Use it to assemble im_lm.asm then enter TC, change the compilation
  637. X: model from small to compact if you wish (thus removing a limitation on
  638. X: the number of files but getting slower code), and press F9...
  639. X: Note: currently, im_lm.asm does not work in the compact model with Turbo C.
  640. X: If you wish to use the compact model, #define NO_ASM in im_lmat.c and
  641. X: remove im_lm.obj from zip.prj.
  642. tasm -t -ml -DDYN_ALLOC im_lm;
  643. X: Let's do ship while we're here
  644. tcc -w -a -d -G -O -Z -ms -Ic:\tc\include -Lc:\tc\lib ship
  645. END_OF_FILE
  646. if test 574 -ne `wc -c <'doturboc.bat'`; then
  647.     echo shar: \"'doturboc.bat'\" unpacked with wrong size!
  648. fi
  649. # end of 'doturboc.bat'
  650. fi
  651. if test -f 'globals.c' -a "${1}" != "-c" ; then 
  652.   echo shar: Will not clobber existing file \"'globals.c'\"
  653. else
  654. echo shar: Extracting \"'globals.c'\" \(2276 characters\)
  655. sed "s/^X//" >'globals.c' <<'END_OF_FILE'
  656. X/*
  657. X
  658. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  659. X Permission is granted to any individual or institution to use, copy, or
  660. X redistribute this software so long as all of the original files are included
  661. X unmodified, that it is not sold for profit, and that this copyright notice
  662. X is retained.
  663. X
  664. X*/
  665. X
  666. X/*
  667. X *  globals.c by Mark Adler.
  668. X */
  669. X
  670. X#define GLOBALS         /* include definition of errors[] in zip.h */
  671. X#include "zip.h"
  672. X
  673. X
  674. X/* Handy place to build error messages */
  675. char errbuf[FNMAX+81];
  676. X
  677. X/* Argument processing globals */
  678. int recurse = 0;        /* 1=recurse into directories encountered */
  679. int pathput = 1;        /* 1=store path with name */
  680. int method = BEST;      /* one of BEST, SHRINK (only), or IMPLODE (only) */
  681. int dosify = 0;         /* 1=make new entries look like MSDOS */
  682. int verbose = 0;        /* 1=report oddities in zip file structure */
  683. int level = 5;          /* 0=fastest compression, 9=best compression */
  684. X#ifdef VMS
  685. X   int vmsver = 0;      /* 1=append VMS version number to file names */
  686. X#endif /* VMS */
  687. int linkput = 0;        /* 1=store symbolic links as such */
  688. int noisy = 1;          /* 0=quiet operation */
  689. char *special = NULL;   /* List of special suffixes */
  690. char *key = NULL;       /* Scramble password if scrambling */
  691. char *tempath = NULL;   /* Path for temporary files */
  692. X
  693. X/* Zip file globals */
  694. char *zipfile;          /* New or existing zip archive (zip file) */
  695. ulg zipbeg;             /* Starting offset of zip structures */
  696. ulg cenbeg;             /* Starting offset of central directory */
  697. struct zlist far *zfiles = NULL;  /* Pointer to list of files in zip file */
  698. extent zcount;          /* Number of files in zip file */
  699. extent zcomlen;         /* Length of zip file comment */
  700. char *zcomment;         /* Zip file comment (not zero-terminated) */
  701. struct zlist far **zsort;       /* List of files sorted by name */
  702. X
  703. X/* Files to operate on that are not in zip file */
  704. struct flist far *found = NULL; /* List of names found */
  705. struct flist far * far *fnxt;   /* Where to put next name in found list */
  706. extent fcount;          /* Count of files in list */
  707. X
  708. X/* Flags for cleaning up after compression routines */
  709. int shract = 0;         /* Shrink active */
  710. int impact = 0;         /* Implosion active */
  711. END_OF_FILE
  712. if test 2276 -ne `wc -c <'globals.c'`; then
  713.     echo shar: \"'globals.c'\" unpacked with wrong size!
  714. fi
  715. # end of 'globals.c'
  716. fi
  717. if test -f 'im_bits.c' -a "${1}" != "-c" ; then 
  718.   echo shar: Will not clobber existing file \"'im_bits.c'\"
  719. else
  720. echo shar: Extracting \"'im_bits.c'\" \(4743 characters\)
  721. sed "s/^X//" >'im_bits.c' <<'END_OF_FILE'
  722. X/*
  723. X
  724. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  725. X Permission is granted to any individual or institution to use, copy, or
  726. X redistribute this software so long as all of the original files are included
  727. X unmodified, that it is not sold for profit, and that this copyright notice
  728. X is retained.
  729. X
  730. X*/
  731. X
  732. X/*
  733. X *  im_bits.c by Richard B. Wales & Jean-loup Gailly.
  734. X *
  735. X *  PURPOSE
  736. X *
  737. X *      Output variable-length bit strings.
  738. X *
  739. X *  DISCUSSION
  740. X *
  741. X *      The PKZIP "imploded" file format interprets compressed file data
  742. X *      as a sequence of bits.  Multi-bit strings in the file may cross
  743. X *      byte boundaries without restriction.
  744. X *
  745. X *      The first bit of each byte is the low-order bit.
  746. X *
  747. X *      The routines in this file allow a variable-length bit value to
  748. X *      be output right-to-left (useful for literal values). For
  749. X *      left-to-right output (useful for code strings from the tree routines),
  750. X *      the bits must have been reversed first with bi_reverse().
  751. X *
  752. X *  INTERFACE
  753. X *
  754. X *      ImpErr bi_init (FILE *fp)
  755. X *          Initialize the bit string routines and specify the output
  756. X *          file to be written to in subsequent calls.
  757. X *
  758. X *      ImpErr bi_rlout (int value, int length)
  759. X *          Write out a bit string, taking the source bits right to
  760. X *          left.
  761. X *
  762. X *      int bi_reverse (int value, int length)
  763. X *          Reverse the bits of a bit string, taking the source bits left to
  764. X *          right and emitting them right to left.
  765. X *
  766. X *      ImpErr bi_windup (void)
  767. X *          Write out any remaining bits in an incomplete byte.
  768. X */
  769. X
  770. X
  771. X#include "implode.h"
  772. X
  773. X
  774. X/***********************************************************************
  775. X *
  776. X * Local data used by the "bit string" routines.
  777. X */
  778. X
  779. X
  780. X/* Current file stream pointer. */
  781. local   FILE *  bi_fp;
  782. X
  783. local unsigned short bi_buf;
  784. X/* Output buffer. bits are inserted starting at the bottom (least significant
  785. X * bits).
  786. X */
  787. X
  788. X#define Buf_size (8 * 2*sizeof(char))
  789. X/* Number of bits used within bi_buf. (bi_buf might be implemented on
  790. X * more than 16 bits on some systems.)
  791. X */
  792. X
  793. local int bi_valid;                  /* number of valid bits in bi_buf */
  794. X/* All bits above the last valid bit are always zero.
  795. X */
  796. X
  797. X/* Output a 16 bit value to the bit stream, lower (oldest) byte first */
  798. X#define PUTSHORT(w) \
  799. X{  (void) zputc ((char)((w) & 0xff), bi_fp); \
  800. X   (void) zputc ((char)((US_INT)(w) >> 8), bi_fp); \
  801. X   if (ferror (bi_fp)) return IM_IOERR; \
  802. X}
  803. X
  804. X/* Output an 8 bit value to the bit stream, bits right to left */
  805. X#define PUTBYTE(w) \
  806. X{  (void) zputc ((char)((w) & 0xff), bi_fp); \
  807. X   if (ferror (bi_fp)) return IM_IOERR; \
  808. X}
  809. X
  810. X/***********************************************************************
  811. X *
  812. X * Initialize the bit string routines.
  813. X */
  814. X
  815. ImpErr
  816. bi_init (fp)
  817. X    FILE *fp;
  818. X{   if (fp == NULL)
  819. X    {   fprintf (stderr, "\nError in bi_init: null file pointer");
  820. X        return IM_LOGICERR;
  821. X    }
  822. X    bi_fp   = fp;
  823. X    bi_buf = 0;
  824. X    bi_valid = 0;
  825. X    return IM_OK;
  826. X}
  827. X
  828. X
  829. X/***********************************************************************
  830. X *
  831. X * Output bits from right to left.
  832. X */
  833. X
  834. ImpErr
  835. bi_rlout (value, length)
  836. X    int value;
  837. X    int length; /* must be <= 16 */
  838. X{
  839. X    /* Send value on length bits. If not enough room in bi_buf, use
  840. X     * (valid) bits from bi_buf and (16 - bi_valid) bits from value, leaving
  841. X     * (width - (16-bi_valid)) unused bits in value.
  842. X     */
  843. X    if (bi_valid > Buf_size - length) {
  844. X        bi_buf |= (value << bi_valid);
  845. X        PUTSHORT(bi_buf);
  846. X        bi_buf = (unsigned short)value >> (Buf_size - bi_valid);
  847. X        bi_valid += length - Buf_size;
  848. X    } else {
  849. X        bi_buf |= value << bi_valid;
  850. X        bi_valid += length;
  851. X    }
  852. X#ifdef  IMPDEBUG
  853. X    fprintf (stderr, " / ");
  854. X    while (length-- > 0)
  855. X    {
  856. X        putc ((value & 1) ? '1' : '0', stderr);
  857. X        value >>= 1;
  858. X    }
  859. X#endif  /* IMPDEBUG */
  860. X    return IM_OK;
  861. X}
  862. X
  863. X
  864. X/***********************************************************************
  865. X *
  866. X * Reverse the bits of a bit string, taking the source bits left to
  867. X * right (starting at 2^15) and emitting them right to left.
  868. X */
  869. X
  870. int
  871. bi_reverse (value, length)
  872. X    int value;
  873. X    int length;
  874. X{
  875. X    int result = 0;
  876. X    unsigned short lbit = 0x8000;
  877. X    unsigned short rbit = 1;
  878. X    while (length-- > 0) {
  879. X       if (value & lbit) result |= rbit;
  880. X       lbit >>= 1, rbit <<= 1;
  881. X    }
  882. X    return result;
  883. X}
  884. X
  885. X
  886. X/***********************************************************************
  887. X *
  888. X * Flush any remaining bits.
  889. X */
  890. X
  891. ImpErr
  892. bi_windup ()
  893. X{
  894. X    if (bi_valid > 8) {
  895. X        PUTSHORT(bi_buf);
  896. X    } else if (bi_valid > 0) {
  897. X        PUTBYTE(bi_buf);
  898. X    }
  899. X    bi_buf = 0;
  900. X    bi_valid = 0;
  901. X    return IM_OK;
  902. X}
  903. X
  904. X
  905. X/**********************************************************************/
  906. END_OF_FILE
  907. if test 4743 -ne `wc -c <'im_bits.c'`; then
  908.     echo shar: \"'im_bits.c'\" unpacked with wrong size!
  909. fi
  910. # end of 'im_bits.c'
  911. fi
  912. if test -f 'implode.h' -a "${1}" != "-c" ; then 
  913.   echo shar: Will not clobber existing file \"'implode.h'\"
  914. else
  915. echo shar: Extracting \"'implode.h'\" \(4579 characters\)
  916. sed "s/^X//" >'implode.h' <<'END_OF_FILE'
  917. X/*
  918. X
  919. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  920. X Permission is granted to any individual or institution to use, copy, or
  921. X redistribute this software so long as all of the original files are included
  922. X unmodified, that it is not sold for profit, and that this copyright notice
  923. X is retained.
  924. X
  925. X*/
  926. X
  927. X/*
  928. X * implode.h by Richard B. Wales.
  929. X */
  930. X
  931. X#include "crypt.h"
  932. X#include "tempf.h"
  933. X#include <errno.h>
  934. X
  935. X
  936. X/***********************************************************************
  937. X *
  938. X * Type definitions.
  939. X */
  940. X
  941. X
  942. typedef long  L_INT;
  943. typedef int   INT;
  944. typedef short S_INT;
  945. X
  946. typedef unsigned long  UL_INT;
  947. typedef unsigned int   U_INT;
  948. typedef unsigned short US_INT;
  949. X
  950. typedef unsigned char  U_CHAR;
  951. X
  952. typedef unsigned long  CRC;
  953. X
  954. X#define VOID void
  955. X
  956. X#define local static            /* More meaningful outside functions */
  957. X/* #define local */
  958. X
  959. X#define TRUE  1
  960. X#define FALSE 0
  961. X
  962. X/* Error return codes. */
  963. typedef
  964. enum
  965. X    {   IM_OK,                  /* all OK */
  966. X        IM_EOF,                 /* end of file on input */
  967. X        IM_IOERR,               /* I/O error */
  968. X        IM_BADARG,              /* invalid procedure argument */
  969. X        IM_NOMEM,               /* out of memory */
  970. X        IM_LOGICERR,            /* logic error */
  971. X        IM_NOCTBLS              /* no more code tables */
  972. X    }
  973. X    ImpErr;
  974. X
  975. X/* The different possible compression methods. */
  976. typedef
  977. enum
  978. X    {   NO_LITERAL_TREE,        /* use only two trees */
  979. X        LITERAL_TREE            /* use all three trees */
  980. X    }
  981. X    Method;
  982. X
  983. X/* File data structure. */
  984. typedef
  985. struct  fdata
  986. X    {   L_INT    fd_len;        /* # of bytes in file */
  987. X        L_INT    fd_clen;       /* compressed length */
  988. X        tFILE    *fd_temp;      /* temporary file stream pointer */
  989. X        U_INT    fd_bufsize;    /* size of sliding dictionary */
  990. X        U_INT    fd_strsize;    /* max string match length */
  991. X        U_INT    fd_nbits;      /* # distance bits to write literally */
  992. X        Method   fd_method;     /* compression method */
  993. X    }
  994. X    FDATA;
  995. X
  996. X/* Data structure for string matches. */
  997. typedef
  998. struct  match
  999. X    {   S_INT       ma_dist;    /* distance back into buffer */
  1000. X        union {
  1001. X           US_INT   ma_length;  /* length of matched string */
  1002. X           U_CHAR   ma_litc[2]; /* literal characters matched */
  1003. X        } l;
  1004. X        /* l is ma_litc if ma_dist <= 0. If ma_dist < 0, the length is
  1005. X         * 2 and the distance is -ma_dist.
  1006. X         */
  1007. X    }
  1008. X    MATCH;
  1009. X
  1010. X
  1011. X/***********************************************************************
  1012. X *
  1013. X * External variable declarations.
  1014. X */
  1015. X
  1016. extern FDATA fd;                /* file data */
  1017. X#ifndef MSDOS
  1018. extern int errno;               /* system error code */
  1019. X#endif  /* MSDOS */
  1020. X
  1021. extern MATCH *ma_buf;           /* match info buffer */
  1022. X#define MA_BUFSIZE 512
  1023. X/* MA_BUFSIZE must be such that
  1024. X *     256*sizeof(TRDATA) <= MA_BUFSIZE*sizeof(MATCH)
  1025. X * since the same buffer is used for both purposes at different times.
  1026. X */
  1027. X
  1028. X/***********************************************************************
  1029. X *
  1030. X * External procedure declarations.
  1031. X */
  1032. X
  1033. X
  1034. X#ifdef  MODERN
  1035. X#include <string.h>
  1036. X#else
  1037. voidp *malloc();
  1038. char  *strcpy();
  1039. char  *strcat();
  1040. X#endif  /* MODERN */
  1041. X
  1042. X
  1043. X/***********************************************************************
  1044. X *
  1045. X * Routines in "im_lmat.c" source file.
  1046. X */
  1047. X
  1048. X
  1049. ImpErr  lm_init
  1050. X        OF ((int pack_level));
  1051. X
  1052. ImpErr  lm_input
  1053. X        OF ((U_CHAR *block, U_INT count));
  1054. X
  1055. ImpErr  lm_windup
  1056. X        OF ((void));
  1057. X
  1058. X
  1059. X/***********************************************************************
  1060. X *
  1061. X * Routines in "im_ctree.c" source file.
  1062. X */
  1063. X
  1064. ImpErr ct_init
  1065. X        OF ((void));
  1066. X
  1067. ImpErr ct_tally
  1068. X        OF ((MATCH *ma));
  1069. X
  1070. ImpErr ct_mktrees
  1071. X        OF ((void));
  1072. X
  1073. ImpErr ct_wrtrees
  1074. X        OF ((FILE *outfp));
  1075. X
  1076. ImpErr ct_wrdata
  1077. X        OF ((FILE *outfp));
  1078. X
  1079. ImpErr ct_windup
  1080. X        OF ((void));
  1081. X
  1082. X
  1083. X/***********************************************************************
  1084. X *
  1085. X * Routines in "im_bits.c" source file.
  1086. X */
  1087. X
  1088. ImpErr bi_init
  1089. X        OF ((FILE *fp));
  1090. X
  1091. ImpErr bi_rlout
  1092. X        OF ((int value, int length));
  1093. X
  1094. int bi_reverse
  1095. X        OF ((int value, int length));
  1096. X
  1097. ImpErr bi_windup
  1098. X        OF ((void));
  1099. X
  1100. X
  1101. X/***********************************************************************
  1102. X *
  1103. X * Routines in "implode.c" source file.
  1104. X */
  1105. X
  1106. int imp_setup
  1107. X        OF ((long filesize, int pack_level));
  1108. X
  1109. int imp_p1
  1110. X        OF ((char *buf, int count));
  1111. X
  1112. int imp_size
  1113. X        OF ((long *size, char *opts));
  1114. X
  1115. int imp_p2
  1116. X        OF ((FILE *outfp));
  1117. X
  1118. int imp_clear
  1119. X        OF ((void));
  1120. X
  1121. X
  1122. X/**********************************************************************/
  1123. END_OF_FILE
  1124. if test 4579 -ne `wc -c <'implode.h'`; then
  1125.     echo shar: \"'implode.h'\" unpacked with wrong size!
  1126. fi
  1127. # end of 'implode.h'
  1128. fi
  1129. if test -f 'infozip.who' -a "${1}" != "-c" ; then 
  1130.   echo shar: Will not clobber existing file \"'infozip.who'\"
  1131. else
  1132. echo shar: Extracting \"'infozip.who'\" \(4521 characters\)
  1133. sed "s/^X//" >'infozip.who' <<'END_OF_FILE'
  1134. These members of the INFO-ZIP group contributed to the development and
  1135. testing of portable Zip.  They are responsible for whatever works in Zip.
  1136. Whatever doesn't work is solely the fault of the authors of Zip (Mark Adler,
  1137. Rich Wales, and Jean-loup Gailly).
  1138. X
  1139. Mark Adler              madler@tybalt.caltech.edu       NeXT 2.x
  1140. Glenn J. Andrews        oper1%drcv06.decnet@drcvax.af.mil       VAX VMS
  1141. Tom Betz                marob!upaya!tbetz@phri.nyu.edu  SCO Xenix 2.3.1
  1142. James Birdsall          jwbirdsa@amc.com                AT&T 3B1
  1143. Wim Bonner              27313853@WSUVM1.CSC.WSU.EDU     HP 9000/840a HPUX
  1144. Paul Borman             prb@cray.com                    Cray-X/YMP,2 UNICOS 6-8
  1145. Leslie C. Brown         lbrown@BRL.MIL                  Pyramid MIS-4
  1146. Ralf Brown              ralf@b.gp.cs.cmu.edu            Pyramid MIS-4
  1147. Pietro Caselli          zaphod@petruz.sublink.org       Minix 1.5.10
  1148. Bill Davidsen           davidsen@crdos1.crd.ge.com      Xenix (on what?)
  1149. Daniel Deimert          daniel@hexagon.se               zeus3.21 Zilog S8000
  1150. James P. Dugal          jpd@usl.edu                     Pyramid 90X OSx4.1
  1151. X"Evil Ed"               esaffle@gmuvax2.gmu.edu         Ulrix-32 V3.1 (Rev. 9)
  1152. Greg Flint              afc@klaatu.cc.purdue.edu        ETA-10P* hybrid Sys V
  1153. Jeff Foy                jfoy@glia.biostr.washington.edu IRIX Sys V Rel 3.3.1
  1154. Kevin M. Fritz          kmfritz@apgea.army.mil          Turbo C++ 1.0
  1155. Jean-loup Gailly        jloup@chorus.fr                 MS-DOS Microsoft C 5.1
  1156. Scott D. Galloway       sgallowa@letterkenn-emh1.army.mil   Sperry 5000 SysV.3
  1157. David Gundlach          david@rolf.stat.uga.edu         Sun SS1+ SunOS 4.1
  1158. Peter Jones             jones@mips1.info.uqam.ca        MIPS UMIPS 4.0
  1159. Bruce Kahn              bkahn@archive.webo.dg.com       MS-DOS Microsoft C 5.1
  1160. Bob Kemp                Robert.V.Kemp@ATT.COM           AT&T 3B2 SysV 3.2v2
  1161. XEarl Kiech              KIECH@utkvx.utk.edu             VAX VMS V5.4-1A
  1162. David Kirschbaum        kirsch@usasoc.soc.mil           He got us all in this
  1163. X                                                        mess in the first place
  1164. Bo Kullmar              bk@kullmar.se                   DNIX 5.2, 5.3
  1165. Harry Langenbacher      harry@neuron6.Jpl.Nasa.Gov      Sun SS1+ SunOS 4.1
  1166. Michael D. Lawler       mdlawler@bsu-cs.bsu.edu         Mt.Xinu BSD 4.3 on VAX
  1167. David Lemson            lemson@ux1.cso.uiuc.edu         Sequent Dynix 3.0.17
  1168. Onno van der Linden     linden@fwi.uva.nl               SCO Unix 3.2.0
  1169. Warner Losh             imp@Solbourne.COM               packing algorithm help
  1170. John Lundin             lundin@urvax.urich.edu          VAX VMS
  1171. Cliff Manis             root@csoftec.csf.com            SCO 2.3.1 (386)
  1172. Bill Marsh              bmarsh@cod.nosc.mil             SGI Iris 4D35
  1173. Robert McBroom (?)      rm3@ornl.gov                    DECsystem 5810
  1174. William O'Shaughnessy   williamo@hpcupt1.cup.hp.com     HPUX
  1175. XEnrico Renato Palmerini palmer@vxscaq.cineca.it         UNISYS 7000 Sys 5 r2.3
  1176. Keith Petersen          w8sdz@simtel20.army.mil         Maintainer of Info-ZIP
  1177. X                                                        Pyramid UCB OSx4.4c
  1178. David A Rasmussen       dave@convex.csd.uwm.edu         Convex C220 with 9.0 OS
  1179. Michael Regoli          mr@cica.indiana.edu             Ultrix 3.1 VAX 8650     
  1180. X                                                        BSD 4.3 IBM RT/125
  1181. X                                                        BSD 4.3 MicroVAX 3500
  1182. X                                                        SunOS 4.0.3 Sun 4/330
  1183. Greg Roelofs            roelofs@amelia.nas.nasa.gov     BSD 4.3 VAX 11/780
  1184. X                                                        VMS 5.2 VAX 8600
  1185. X                                                        UTS 1.2.4 Amdahl 5800
  1186. X                                                        Ultrix 4.1 DEC 5810
  1187. X                                                        Unicos 5.1, 6.0.11 Cray
  1188. X                                                        MS-DOS Microsoft C 6.0
  1189. X                                                        Irix 3.3.2, SGI Iris 4D
  1190. Kai Uwe Rommel          rommel@informatik.tu-muenchen.de        OS/2
  1191. Dave Sisson             daves@vtcosy.cns.vt.edu         AIX 1.1.1 PS/2 & 3090
  1192. Ron Srodawa             srodawa@vela.acs.oakland.edu    SCO Xenix/386 2.3.3
  1193. Bertil Stenstr|m        stenis@heron.qz.se              HP-UX 7.0 HP9000/835
  1194. Arjan de Vet            devet@info.win.tue.nl           SunOS 4.1, MSC 5.1
  1195. Rich Wales              wales@cs.ucla.edu               SunOS 4.0.3 Sun-3/50
  1196. END_OF_FILE
  1197. if test 4521 -ne `wc -c <'infozip.who'`; then
  1198.     echo shar: \"'infozip.who'\" unpacked with wrong size!
  1199. fi
  1200. # end of 'infozip.who'
  1201. fi
  1202. if test -f 'makecrc.c' -a "${1}" != "-c" ; then 
  1203.   echo shar: Will not clobber existing file \"'makecrc.c'\"
  1204. else
  1205. echo shar: Extracting \"'makecrc.c'\" \(2388 characters\)
  1206. sed "s/^X//" >'makecrc.c' <<'END_OF_FILE'
  1207. X/* Not copyrighted 1990 Mark Adler */
  1208. X
  1209. X#include <stdio.h>
  1210. X
  1211. main()
  1212. X/*
  1213. X  Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
  1214. X  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
  1215. X
  1216. X  Polynomials over GF(2) are represented in binary, one bit per coefficient,
  1217. X  with the lowest powers in the most significant bit.  Then adding polynomials
  1218. X  is just exclusive-or, and multiplying a polynomial by x is a right shift by
  1219. X  one.  If we call the above polynomial p, and represent a byte as the
  1220. X  polynomial q, also with the lowest power in the most significant bit (so the
  1221. X  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
  1222. X  where a mod b means the remainder after dividing a by b.
  1223. X
  1224. X  This calculation is done using the shift-register method of multiplying and
  1225. X  taking the remainder.  The register is initialized to zero, and for each
  1226. X  incoming bit, x^32 is added mod p to the register if the bit is a one (where
  1227. X  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
  1228. X  x (which is shifting right by one and adding x^32 mod p if the bit shifted
  1229. X  out is a one).  We start with the highest power (least significant bit) of
  1230. X  q and repeat for all eight bits of q.
  1231. X
  1232. X  The table is simply the CRC of all possible eight bit values.  This is all
  1233. X  the information needed to generate CRC's on data a byte at a time for all
  1234. X  combinations of CRC register values and incoming bytes.  The table is
  1235. X  written to stdout as 256 long hexadecimal values in C language format.
  1236. X*/
  1237. X{
  1238. X  unsigned long c;      /* crc shift register */
  1239. X  unsigned long e;      /* polynomial exclusive-or pattern */
  1240. X  int i;                /* counter for all possible eight bit values */
  1241. X  int k;                /* byte being shifted into crc apparatus */
  1242. X
  1243. X  /* terms of polynomial defining this crc (except x^32): */
  1244. X  static int p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
  1245. X
  1246. X  /* Make exclusive-or pattern from polynomial */
  1247. X  e = 0;
  1248. X  for (i = 0; i < sizeof(p)/sizeof(int); i++)
  1249. X    e |= 1L << (31 - p[i]);
  1250. X
  1251. X  /* Compute and print table of CRC's, five per line */
  1252. X  printf("  0x00000000L");
  1253. X  for (i = 1; i < 256; i++)
  1254. X  {
  1255. X    c = 0;
  1256. X    for (k = i | 256; k != 1; k >>= 1)
  1257. X    {
  1258. X      c = c & 1 ? (c >> 1) ^ e : c >> 1;
  1259. X      if (k & 1)
  1260. X        c ^= e;
  1261. X    }
  1262. X    printf(i % 5 ? ", 0x%08lxL" : ",\n  0x%08lxL", c);
  1263. X  }
  1264. X  putchar('\n');
  1265. X  return 0;
  1266. X}
  1267. END_OF_FILE
  1268. if test 2388 -ne `wc -c <'makecrc.c'`; then
  1269.     echo shar: \"'makecrc.c'\" unpacked with wrong size!
  1270. fi
  1271. # end of 'makecrc.c'
  1272. fi
  1273. if test -f 'makefile' -a "${1}" != "-c" ; then 
  1274.   echo shar: Will not clobber existing file \"'makefile'\"
  1275. else
  1276. echo shar: Extracting \"'makefile'\" \(4489 characters\)
  1277. sed "s/^X//" >'makefile' <<'END_OF_FILE'
  1278. X# Makefile for Zip, ZipNote, ZipSplit, and Ship.
  1279. X# Note: this makefile leaves out the encryption/decryption part of zip, and
  1280. X#  completely leaves out the zipcloak program.
  1281. X
  1282. X# what you can make ...
  1283. default:
  1284. X    @echo ''
  1285. X    @echo 'Make what?  You must say what system to make Zip for--e.g.'
  1286. X    @echo '"make bsd".  Choices: bsd, bsdold, sysv, sun, next, next10,'
  1287. X    @echo 'hpux, dnix, cray, 3b1, zilog, aux, convex, aix, and minix.'
  1288. X    @echo 'See the file zip.doc for more information.'
  1289. X    @echo ''
  1290. X
  1291. X# variables (to use the Gnu compiler, change cc to gcc in CC and BIND)
  1292. MAKE = make
  1293. CC = cc
  1294. BIND = cc
  1295. RENAME = mv
  1296. X
  1297. X# flags
  1298. X#   CFLAGS    flags for C compile
  1299. X#   LFLAGS1   flags after output file spec, before obj file list
  1300. X#   LFLAGS2   flags after obj file list (libraries, etc)
  1301. CFLAGS =
  1302. LFLAGS1 =
  1303. LFLAGS2 = -s
  1304. X
  1305. X# object file lists
  1306. OBJZ = zip.o zipfile.o zipup.o fileio.o util.o tempf.o shrink.o globals.o
  1307. OBJI = implode.o im_lmat.o im_ctree.o im_bits.o
  1308. OBJN = zipnote.o zipfile_.o zipup_.o fileio_.o globals.o
  1309. OBJS = zipsplit.o zipfile_.o zipup_.o fileio_.o globals.o
  1310. X
  1311. X# suffix rules
  1312. X.SUFFIXES:
  1313. X.SUFFIXES: _.o .o .c .doc .1
  1314. X.c_.o:
  1315. X    $(RENAME) $< $*_.c
  1316. X    $(CC) $(CFLAGS) -DUTIL -DEXPORT -c $*_.c
  1317. X    $(RENAME) $*_.c $<
  1318. X.c.o:
  1319. X    $(CC) $(CFLAGS) -DEXPORT -c $<
  1320. X.1.doc:
  1321. X    nroff -man $< | col -b > $@
  1322. X
  1323. X# rules for zip, zipnote, zipsplit, and zip.doc.
  1324. X$(OBJZ): zip.h ziperr.h tempf.h tailor.h
  1325. X$(OBJI): implode.h crypt.h ziperr.h tempf.h tailor.h
  1326. X$(OBJN): zip.h ziperr.h tailor.h
  1327. X$(OBJS): zip.h ziperr.h tailor.h
  1328. zip.o zipup.o zipnote.o zipsplit.o: revision.h
  1329. zips: zip zipnote zipsplit ship
  1330. zipsman: zip zipnote zipsplit ship zip.doc
  1331. zip: $(OBJZ) $(OBJI)
  1332. X    $(BIND) -o zip $(LFLAGS1) $(OBJZ) $(OBJI) $(LFLAGS2)
  1333. zipnote: $(OBJN)
  1334. X    $(BIND) -o zipnote $(LFLAGS1) $(OBJN) $(LFLAGS2)
  1335. zipsplit: $(OBJS)
  1336. X    $(BIND) -o zipsplit $(LFLAGS1) $(OBJS) $(LFLAGS2)
  1337. ship: ship.c
  1338. X    $(CC) $(CFLAGS) -o ship $(LFLAGS1) ship.c $(LFLAGS2)
  1339. X
  1340. X# These symbols, when #defined using -D have these effects on compilation:
  1341. X# ZMEM        - includes C language versions of memset(), memcpy(), and
  1342. X#          memcmp() (util.c).
  1343. X# DIRENT    - use <sys/dirent.h> and getdents() instead of <sys/dir.h>
  1344. X#          and opendir(), etc. (fileio.c).
  1345. X# NODIR        - used for 3B1, which has neither getdents() nor opendir().
  1346. X# NDIR        - use "ndir.h" instead of <sys/dir.h> (fileio.c).
  1347. X# UTIL        - select routines for utilities (note and split).
  1348. X# PROTO        - enable function prototypes.
  1349. X# RMDIR        - remove directories using a system("rmdir ...") call.
  1350. X# CONVEX    - for Convex make target.
  1351. X# AIX        - for AIX make target.
  1352. X# EXPORT    - leave out the encryption code.
  1353. X
  1354. X# BSD 4.3 (also Unisys 7000--AT&T System V with heavy BSD 4.2)
  1355. bsd:
  1356. X    $(MAKE) zips CFLAGS="-O"
  1357. X
  1358. X# BSD, but missing memset(), memcmp().
  1359. bsdold:
  1360. X    $(MAKE) zips CFLAGS="-O -DZMEM"
  1361. X
  1362. X# AT&T System V, Rel 3.  Also SCO, Xenix, OpenDeskTop, ETA-10P*, SGI.
  1363. sysv:
  1364. X    $(MAKE) zips CFLAGS="-O -DDIRENT"
  1365. X
  1366. X# DNIX 5.x: like System V but optimization is messed up.
  1367. dnix:
  1368. X    $(MAKE) zips CFLAGS="-DDIRENT"
  1369. X
  1370. X# Sun OS 4.x: BSD, but use getdents().
  1371. sun:
  1372. X    $(MAKE) zips CFLAGS="-O -DDIRENT"
  1373. X
  1374. X# NeXT 1.0: BSD, but use shared library.
  1375. next10:
  1376. X    $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -lsys_s"
  1377. X
  1378. X# NeXT 2.0: BSD, but use MH_OBJECT format for smaller executables.
  1379. next:
  1380. X    $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -object"
  1381. X
  1382. X# HPUX: System V, but use <ndir.h> and opendir(), etc.
  1383. hpux:
  1384. X    $(MAKE) zips CFLAGS="-O -DNDIR"
  1385. X
  1386. X# Cray Unicos 5.1.10 & 6.0.11, Standard C compiler 2.0
  1387. cray:
  1388. X    $(MAKE) zips CFLAGS="-O -DDIRENT" CC="scc"
  1389. X
  1390. X# AT&T 3B1: System V, but missing a few things.
  1391. X3b1:
  1392. X    $(MAKE) zips CFLAGS="-O -DNODIR -DRMDIR"
  1393. X
  1394. X# zilog zeus 3.21
  1395. zilog:
  1396. X    $(MAKE) zips CFLAGS="-O -DZMEM -DNDIR -DRMDIR" CC="scc -i"
  1397. X
  1398. X# SCO 386 cross compile for MS-DOS
  1399. X# Note: zip.exe should be lzexe'd on DOS to reduce its size
  1400. scodos:
  1401. X    $(MAKE) zips CFLAGS="-O -Ms -dos -DNO_ASM" LFLAGS1="-Ms -dos" \
  1402. X     LFLAGS2=""
  1403. X    $(RENAME) zip zip.exe
  1404. X
  1405. X# A/UX:
  1406. aux:
  1407. X    $(MAKE) zips CFLAGS="-O -DTERMIO"
  1408. X
  1409. X# Convex C220, OS 9.0
  1410. convex:
  1411. X    $(MAKE) zips CFLAGS="-O2 -rl -DCONVEX"
  1412. X
  1413. X# AIX Version 3.1 for RISC System/6000 
  1414. aix:
  1415. X    $(MAKE) zips CC="c89" BIND="c89" \
  1416. X       CFLAGS="-O -D_POSIX_SOURCE -D_ALL_SOURCE -D_BSD -DAIX"
  1417. X
  1418. X# MINIX 1.5.10 with Bruce Evans 386 patches and gcc/GNU make
  1419. minix:
  1420. X    $(MAKE) zips CFLAGS="-O -DDIRENT -DMINIX" CC=gcc BIND=gcc
  1421. X    chmem =262144 zip
  1422. X
  1423. X# clean up after making stuff and installing it
  1424. clean:
  1425. X    rm -f *.o
  1426. X    rm -f zip zipnote zipsplit ship
  1427. X
  1428. X# This one's for my own use during development.
  1429. it:
  1430. X    $(MAKE) zipsman CFLAGS="-O -Wall -DPROTO" LFLAGS2="-s -object"\
  1431. X    VPATH="${HOME}/Unix/bin"
  1432. X
  1433. X# end of Makefile
  1434. END_OF_FILE
  1435. if test 4489 -ne `wc -c <'makefile'`; then
  1436.     echo shar: \"'makefile'\" unpacked with wrong size!
  1437. fi
  1438. # end of 'makefile'
  1439. fi
  1440. if test -f 'makefile.bor' -a "${1}" != "-c" ; then 
  1441.   echo shar: Will not clobber existing file \"'makefile.bor'\"
  1442. else
  1443. echo shar: Extracting \"'makefile.bor'\" \(3300 characters\)
  1444. sed "s/^X//" >'makefile.bor' <<'END_OF_FILE'
  1445. X# Makefile for Zip, ZipNote, ZipSplit, and Ship, for
  1446. X# Borland (Turbo) C++ 1.0 or 2.0.
  1447. X# Warning: this file is not suitable for Turbo C 2.0. Use zip.prj instead.
  1448. X
  1449. X# To use, do "make -fmakefile.bor"
  1450. X# If you do not have masm or tasm, or if you are using the compact model,
  1451. X# then add -DNO_ASM to CFLAGS and remove im_lm.obj from OBJI
  1452. X
  1453. X# Warning: the default used here is the small model, which produces
  1454. X# faster code, but imposes some limitation on the number of files
  1455. X# that zip can process. Compile with the compact model to remove these
  1456. X# limitations.
  1457. X
  1458. X# ------------- Turbo C++, Borland C++ -------------
  1459. MODEL=-ms
  1460. X#   Change to -mc for compact model
  1461. CFLAGS=-w -w-eff -w-def -w-sig -a -d -G -O -Z $(MODEL) -DEXPORT
  1462. UTILFLAGS=-DUTIL $(CFLAGS) -o
  1463. CC=bcc
  1464. LD=bcc
  1465. X#   replace bcc with tcc for Turbo C++ 1.0
  1466. LDFLAGS=$(MODEL)
  1467. AS=tasm
  1468. ASFLAGS=-ml -t -DDYN_ALLOC
  1469. X
  1470. X# ------------- Common declarations:
  1471. STRIP=rem
  1472. X#    If you don't have lzexe, get it. Then define:
  1473. X#STRIP=lzexe
  1474. X#    This makes a big difference in .exe size (and possibly load time)
  1475. X
  1476. X# variables
  1477. OBJZ = zip.obj zipfile.obj zipup.obj fileio.obj util.obj tempf.obj shrink.obj\
  1478. X globals.obj
  1479. OBJI = implode.obj im_lmat.obj im_ctree.obj im_bits.obj im_lm.obj
  1480. X# remove im_lm.obj in above line if you do not have masm
  1481. X
  1482. OBJN = zipnote.obj zipfile_.obj zipup_.obj fileio_.obj globals.obj
  1483. OBJS = zipsplit.obj zipfile_.obj zipup_.obj fileio_.obj globals.obj
  1484. X
  1485. zips:    zip.exe zipnote.exe zipsplit.exe ship.exe
  1486. X
  1487. zip.obj:    zip.h ziperr.h tailor.h revision.h zip.c
  1488. X    $(CC) -c $(CFLAGS) $*.c
  1489. X
  1490. zipfile.obj:    zip.h ziperr.h tailor.h zipfile.c
  1491. X    $(CC) -c $(CFLAGS) $*.c
  1492. X
  1493. zipup.obj:    zip.h ziperr.h tailor.h revision.h zipup.c
  1494. X    $(CC) -c $(CFLAGS) $*.c
  1495. X
  1496. fileio.obj:    zip.h ziperr.h tailor.h fileio.c
  1497. X    $(CC) -c $(CFLAGS) $*.c
  1498. X
  1499. util.obj:    zip.h ziperr.h tailor.h util.c
  1500. X    $(CC) -c $(CFLAGS) $*.c
  1501. X
  1502. tempf.obj:    tempf.h tailor.h tempf.c
  1503. X    $(CC) -c $(CFLAGS) $*.c
  1504. X
  1505. shrink.obj:    zip.h ziperr.h tempf.h tailor.h shrink.c
  1506. X    $(CC) -c $(CFLAGS) $*.c
  1507. X
  1508. globals.obj:    zip.h ziperr.h tailor.h globals.c
  1509. X    $(CC) -c $(CFLAGS) $*.c
  1510. X
  1511. zipnote.obj:    zip.h ziperr.h tailor.h revision.h zipnote.c
  1512. X    $(CC) -c $(CFLAGS) $*.c
  1513. X
  1514. zipsplit.obj:    zipsplit.c zip.h ziperr.h tailor.h revision.h
  1515. X    $(CC) -c $(CFLAGS) $*.c
  1516. X
  1517. implode.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h implode.c
  1518. X    $(CC) -c $(CFLAGS) $*.c
  1519. X
  1520. im_lmat.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_lmat.c
  1521. X    $(CC) -c $(CFLAGS) $*.c
  1522. X
  1523. im_lm.obj:    im_lm.asm
  1524. X    $(AS) $(ASFLAGS) im_lm;
  1525. X
  1526. im_ctree.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_ctree.c
  1527. X    $(CC) -c $(CFLAGS) $*.c
  1528. X
  1529. im_bits.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_bits.c
  1530. X    $(CC) -c $(CFLAGS) $*.c
  1531. X
  1532. zipfile_.obj:    zipfile.c zip.h
  1533. X    $(CC) -c $(UTILFLAGS)$* zipfile.c
  1534. X
  1535. zipup_.obj:    zipup.c zip.h
  1536. X    $(CC) -c $(UTILFLAGS)$* zipup.c
  1537. X
  1538. fileio_.obj:    fileio.c zip.h
  1539. X    $(CC) -c $(UTILFLAGS)$* fileio.c
  1540. X
  1541. X# we must cut the command line to fit in the MS/DOS 128 byte limit:
  1542. zip.exe: $(OBJZ) $(OBJI)
  1543. X    echo $(OBJZ) > zip.rsp
  1544. X    echo $(OBJI) >> zip.rsp
  1545. X    $(LD) $(LDFLAGS) @zip.rsp
  1546. X    del zip.rsp
  1547. X    $(STRIP) zip.exe
  1548. X
  1549. zipnote.exe: $(OBJN)
  1550. X    echo $(OBJN) > zipn.rsp
  1551. X    $(LD) $(LDFLAGS) @zipn.rsp
  1552. X    del zipn.rsp
  1553. X    $(STRIP) zipnote.exe
  1554. X
  1555. zipsplit.exe: $(OBJS)
  1556. X    echo $(OBJS) > zips.rsp
  1557. X    $(LD) $(LDFLAGS) @zips.rsp
  1558. X    del zips.rsp
  1559. X    $(STRIP) zipsplit.exe
  1560. X
  1561. ship.exe: ship.c
  1562. X    $(CC) $(CFLAGS) ship.c
  1563. X    $(STRIP) ship.exe
  1564. END_OF_FILE
  1565. if test 3300 -ne `wc -c <'makefile.bor'`; then
  1566.     echo shar: \"'makefile.bor'\" unpacked with wrong size!
  1567. fi
  1568. # end of 'makefile.bor'
  1569. fi
  1570. if test -f 'makefile.msc' -a "${1}" != "-c" ; then 
  1571.   echo shar: Will not clobber existing file \"'makefile.msc'\"
  1572. else
  1573. echo shar: Extracting \"'makefile.msc'\" \(3286 characters\)
  1574. sed "s/^X//" >'makefile.msc' <<'END_OF_FILE'
  1575. X# Makefile for Zip, ZipNote, ZipSplit, and Ship, for
  1576. X# Microsoft C 5.1 or 6.0.
  1577. X
  1578. X# To use, do "make makefile.msc"
  1579. X# If you do not have masm or tasm, then add -DNO_ASM to CFLAGS and remove
  1580. X# im_lm.obj from OBJI
  1581. X
  1582. X# Warning: the default used here is the small model, which produces
  1583. X# faster code, but imposes some limitation on the number of files
  1584. X# that zip can process. Compile with the compact model to remove these
  1585. X# limitations.
  1586. X
  1587. X# ------------- Microsoft C 5.1 or 6.0 -------------
  1588. MODEL=-AS
  1589. X#     Change to -AC for compact model
  1590. CFLAGS=-W3 -Ox -nologo $(MODEL)
  1591. SPECFLAGS=-W3 -Oaict -Gs -nologo $(MODEL) -DEXPORT
  1592. UTILFLAGS=-DUTIL $(CFLAGS) -Fo
  1593. CC=cl
  1594. LD=link
  1595. LDFLAGS=/e/st:0x1000
  1596. X#     If you use lzexe as recommended, remove /e from LDFLAGS
  1597. AS=masm
  1598. X#     For MSC 6.0, use: AS=ml 
  1599. ASFLAGS=-ml -t
  1600. X
  1601. X# ------------- Common declarations:
  1602. STRIP=rem
  1603. X#    If you don't have lzexe, get it. Then define:
  1604. X#STRIP=lzexe
  1605. X#    This makes a big difference in .exe size (and possibly load time)
  1606. X
  1607. X# variables
  1608. OBJZ = zip.obj zipfile.obj zipup.obj fileio.obj util.obj tempf.obj shrink.obj\
  1609. X globals.obj
  1610. OBJI = implode.obj im_lmat.obj im_ctree.obj im_bits.obj im_lm.obj
  1611. X# remove im_lm.obj in above line if you do not have masm
  1612. X
  1613. OBJN = zipnote.obj zipfile_.obj zipup_.obj fileio_.obj globals.obj
  1614. OBJS = zipsplit.obj zipfile_.obj zipup_.obj fileio_.obj globals.obj
  1615. X
  1616. zips:    zip.exe zipnote.exe zipsplit.exe ship.exe
  1617. X
  1618. zip.obj:    zip.h ziperr.h tailor.h revision.h zip.c
  1619. X    $(CC) -c $(CFLAGS) $*.c
  1620. X
  1621. zipfile.obj:    zip.h ziperr.h tailor.h zipfile.c
  1622. X    $(CC) -c $(SPECFLAGS) $*.c
  1623. X
  1624. zipup.obj:    zip.h ziperr.h tailor.h revision.h zipup.c
  1625. X    $(CC) -c $(CFLAGS) $*.c
  1626. X
  1627. fileio.obj:    zip.h ziperr.h tailor.h fileio.c
  1628. X    $(CC) -c $(CFLAGS) $*.c
  1629. X
  1630. util.obj:    zip.h ziperr.h tailor.h util.c
  1631. X    $(CC) -c $(CFLAGS) $*.c
  1632. X
  1633. tempf.obj:    tempf.h tailor.h tempf.c
  1634. X    $(CC) -c $(CFLAGS) $*.c
  1635. X
  1636. shrink.obj:    zip.h ziperr.h tempf.h tailor.h shrink.c
  1637. X    $(CC) -c $(CFLAGS) $*.c
  1638. X
  1639. globals.obj:    zip.h ziperr.h tailor.h globals.c
  1640. X    $(CC) -c $(CFLAGS) $*.c
  1641. X
  1642. zipnote.obj:    zip.h ziperr.h tailor.h revision.h zipnote.c
  1643. X    $(CC) -c $(CFLAGS) $*.c
  1644. X
  1645. X# MSC 5.1 dies on zipsplit with -Ox
  1646. zipsplit.obj:    zipsplit.c zip.h ziperr.h tailor.h revision.h
  1647. X    $(CC) -c $(SPECFLAGS) $*.c
  1648. X
  1649. implode.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h implode.c
  1650. X    $(CC) -c $(CFLAGS) $*.c
  1651. X
  1652. im_lmat.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_lmat.c
  1653. X    $(CC) -c $(CFLAGS) $*.c
  1654. X
  1655. im_lm.obj:    im_lm.asm
  1656. X    $(AS) $(ASFLAGS) im_lm;
  1657. X
  1658. im_ctree.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_ctree.c
  1659. X    $(CC) -c $(CFLAGS) $*.c
  1660. X
  1661. im_bits.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_bits.c
  1662. X    $(CC) -c $(CFLAGS) $*.c
  1663. X
  1664. zipfile_.obj:    zipfile.c zip.h
  1665. X    $(CC) -c $(UTILFLAGS)$@ zipfile.c
  1666. X
  1667. zipup_.obj:    zipup.c zip.h
  1668. X    $(CC) -c $(UTILFLAGS)$@ zipup.c
  1669. X
  1670. fileio_.obj:    fileio.c zip.h
  1671. X    $(CC) -c $(UTILFLAGS)$@ fileio.c
  1672. X
  1673. X# we must cut the command line to fit in the MS/DOS 128 byte limit:
  1674. zip.exe: $(OBJZ) $(OBJI)
  1675. X    echo $(OBJZ)+ > zip.rsp
  1676. X    echo $(OBJI); >> zip.rsp
  1677. X    $(LD) $(LDFLAGS) @zip.rsp
  1678. X    del zip.rsp
  1679. X    $(STRIP) zip.exe
  1680. X
  1681. zipnote.exe: $(OBJN)
  1682. X    echo $(OBJN); > zipn.rsp
  1683. X    $(LD) $(LDFLAGS) @zipn.rsp
  1684. X    del zipn.rsp
  1685. X    $(STRIP) zipnote.exe
  1686. X
  1687. zipsplit.exe: $(OBJS)
  1688. X    echo $(OBJS); > zips.rsp
  1689. X    $(LD) $(LDFLAGS) @zips.rsp
  1690. X    del zips.rsp
  1691. X    $(STRIP) zipsplit.exe
  1692. X
  1693. ship.exe: ship.c
  1694. X    $(CC) $(CFLAGS) ship.c
  1695. X    $(STRIP) ship.exe
  1696. END_OF_FILE
  1697. if test 3286 -ne `wc -c <'makefile.msc'`; then
  1698.     echo shar: \"'makefile.msc'\" unpacked with wrong size!
  1699. fi
  1700. # end of 'makefile.msc'
  1701. fi
  1702. if test -f 'makefile.os2' -a "${1}" != "-c" ; then 
  1703.   echo shar: Will not clobber existing file \"'makefile.os2'\"
  1704. else
  1705. echo shar: Extracting \"'makefile.os2'\" \(3393 characters\)
  1706. sed "s/^X//" >'makefile.os2' <<'END_OF_FILE'
  1707. X# Makefile for Zip, ZipNote, ZipSplit, and Ship
  1708. X# for Microsoft C 6.00 and MASM 6.00 under OS/2.
  1709. X
  1710. X# To use, enter "nmake -f makefile.os2".
  1711. X
  1712. X# The resulting programs can be used under OS/2 protected
  1713. X# and real mode as well as under MS-DOS!
  1714. X# A larger stack has to be used for OS/2 because system calls
  1715. X# use more stack than under DOS, 8k is recommended by Microsoft.
  1716. X
  1717. X# Note that __STDC__ has to be defined explicitly with C 6.00 when -Ze
  1718. X# is given, because Microsoft disables __STDC__ when their extensions
  1719. X# are enabled. This is different to the C 5.10 behaviour.
  1720. X
  1721. X# If you do not have masm, then add -DNO_ASM to CFLAGS and remove
  1722. X# im_lm.obj from OBJI
  1723. X
  1724. MODEL=-AC
  1725. X# change this to -AS to use the small model
  1726. DEFINES=-D__STDC__ -DOS2 -DEXPORT
  1727. X
  1728. X# Loop optimization -Ol with C 6.00A is sometimes not safe.
  1729. X# Use it only for time-critical modules.
  1730. X
  1731. CC=cl -nologo
  1732. CFLAGS=$(MODEL) -W1 -Zep1 -J -G2s -Ocegit $(DEFINES)
  1733. XXFLAGS=-Oxaz
  1734. LDFLAGS=$(MODEL) -Lp -F 2000
  1735. AS=ml -nologo
  1736. AFLAGS=-W2 -Zm -Cp $(DEFINES)
  1737. X
  1738. X# For protect-mode only programs use rem
  1739. STRIP=bind -nologo
  1740. X# STRIP=rem
  1741. X
  1742. X# variables
  1743. X# remove im_lm.obj in OBJI if you do not have masm
  1744. OBJZ = zip.obj zipfile.obj zipup.obj fileio.obj util.obj tempf.obj \
  1745. X       shrink.obj globals.obj dir_os2.obj
  1746. OBJI = implode.obj im_lmat.obj im_ctree.obj im_bits.obj im_lm.obj
  1747. X
  1748. OBJN = zipnote.obj zipfile_.obj zipup_.obj fileio_.obj globals.obj
  1749. OBJS = zipsplit.obj zipfile_.obj zipup_.obj fileio_.obj globals.obj
  1750. X
  1751. zips:    zip.exe zipnote.exe zipsplit.exe ship.exe
  1752. X
  1753. zip.obj:    zip.h ziperr.h tailor.h revision.h zip.c
  1754. X    $(CC) -c $(CFLAGS) $*.c
  1755. X
  1756. zipfile.obj:    zip.h ziperr.h tailor.h zipfile.c
  1757. X    $(CC) -c $(CFLAGS) $*.c
  1758. X
  1759. zipup.obj:    zip.h ziperr.h tailor.h revision.h zipup.c
  1760. X    $(CC) -c $(CFLAGS) $*.c
  1761. X
  1762. fileio.obj:    zip.h ziperr.h tailor.h fileio.c
  1763. X    $(CC) -c $(CFLAGS) $*.c
  1764. X
  1765. util.obj:    zip.h ziperr.h tailor.h util.c
  1766. X    $(CC) -c $(CFLAGS) $*.c
  1767. X
  1768. tempf.obj:    tempf.h tailor.h tempf.c
  1769. X    $(CC) -c $(CFLAGS) $*.c
  1770. X
  1771. shrink.obj:    zip.h ziperr.h tempf.h tailor.h shrink.c
  1772. X    $(CC) -c $(CFLAGS) $(XFLAGS) $*.c
  1773. X
  1774. globals.obj:    zip.h ziperr.h tailor.h globals.c
  1775. X    $(CC) -c $(CFLAGS) $*.c
  1776. X
  1777. dir_os2.obj: dir_os2.c dir_os2.h
  1778. X    $(CC) -c $(CFLAGS) dir_os2.c
  1779. X
  1780. zipnote.obj:    zip.h ziperr.h tailor.h revision.h zipnote.c
  1781. X    $(CC) -c $(CFLAGS) $*.c
  1782. X
  1783. zipsplit.obj: zipsplit.c zip.h ziperr.h tailor.h revision.h
  1784. X    $(CC) -c $(CFLAGS) $*.c
  1785. X
  1786. implode.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h implode.c
  1787. X    $(CC) -c $(CFLAGS) $(XFLAGS) $*.c
  1788. X
  1789. im_lmat.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_lmat.c
  1790. X    $(CC) -c $(CFLAGS) $(XFLAGS) $*.c
  1791. X
  1792. im_lm.obj:    im_lm.asm
  1793. X    $(AS) -c $(AFLAGS) $*.asm
  1794. X#    masm -ml -t -DOS2 im_lm.asm;   # use this for 5.10
  1795. X
  1796. im_ctree.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_ctree.c
  1797. X    $(CC) -c $(CFLAGS) $(XFLAGS) $*.c
  1798. X
  1799. im_bits.obj:    implode.h crypt.h ziperr.h tempf.h tailor.h im_bits.c
  1800. X    $(CC) -c $(CFLAGS) $(XFLAGS) $*.c
  1801. X
  1802. zipfile_.obj: zipfile.c zip.h
  1803. X    $(CC) -c $(CFLAGS) -DUTIL -Fo$@ zipfile.c
  1804. X
  1805. zipup_.obj: zipup.c zip.h
  1806. X    $(CC) -c $(CFLAGS) -DUTIL -Fo$@ zipup.c
  1807. X
  1808. fileio_.obj: fileio.c zip.h
  1809. X    $(CC) -c $(CFLAGS) -DUTIL -Fo$@ fileio.c
  1810. X
  1811. zip.exe: $(OBJZ) $(OBJI) zip.def
  1812. X    $(CC) $(LDFLAGS) $** -o $@
  1813. X        $(STRIP) $@ -n DOSQFSATTACH
  1814. X
  1815. zipnote.exe: $(OBJN) zip.def
  1816. X    $(CC) $(LDFLAGS) $** -o $@
  1817. X        $(STRIP) $@
  1818. X
  1819. zipsplit.exe: $(OBJS) zip.def
  1820. X    $(CC) $(LDFLAGS) $** -o $@
  1821. X        $(STRIP) $@
  1822. X
  1823. ship.exe: ship.c ship.def
  1824. X    $(CC) $(CFLAGS) $(LDFLAGS) $** -o $@
  1825. X        $(STRIP) $@
  1826. END_OF_FILE
  1827. if test 3393 -ne `wc -c <'makefile.os2'`; then
  1828.     echo shar: \"'makefile.os2'\" unpacked with wrong size!
  1829. fi
  1830. # end of 'makefile.os2'
  1831. fi
  1832. if test -f 'makefile.pwc' -a "${1}" != "-c" ; then 
  1833.   echo shar: Will not clobber existing file \"'makefile.pwc'\"
  1834. else
  1835. echo shar: Extracting \"'makefile.pwc'\" \(3619 characters\)
  1836. sed "s/^X//" >'makefile.pwc' <<'END_OF_FILE'
  1837. X# Makefile for Zip, ZipNote, ZipSplit, and Ship, for Power C.
  1838. X
  1839. X# This version by Bob Hardy, 07-16-91
  1840. X
  1841. X# Make sure you have plenty of free diskspace before invoking make,
  1842. X# especially for "make zips".  If you run out of space, several lines
  1843. X# will lose dramatically, and the make will fail.  You may even have
  1844. X# to rename some source files.
  1845. X
  1846. CC=pc
  1847. LD=pcl
  1848. MODEL=m
  1849. X# (note from the editor: the "m" here for MODEL looks a little suspicious--
  1850. X#  it probably should be s or c, since the small or compact models are what
  1851. X#  should be used.)
  1852. CFLAGS=/f- /m$(MODEL) /dMSDOS /dNO_ASM /dEXPORT
  1853. LDFLAGS=/d 
  1854. STRIP=lzexe
  1855. X# If you don't have lzexe, get it. Then define:
  1856. X#    STRIP=lzexe
  1857. X# This makes a *big* difference in .exe size (hence load time)
  1858. X# If you want to make without it, comment out all the STRIP lines and the
  1859. X# "rm *.old" lines.  This will cost you in terms of disk usage, though.
  1860. X
  1861. X# variables
  1862. OBJZ1 = zip.mix zipfile.mix zipup.mix fileio.mix util.mix
  1863. OBJZ2 = shrink.mix globals.mix tempf.mix
  1864. OBJC2 = util.mix globals.mix
  1865. OBJI = implode.mix im_lmat.mix im_ctree.mix im_bits.mix
  1866. OBJN = zipnote.mix zipfile_.mix zipup_.mix fileio_.mix globals.mix
  1867. OBJS = zipsplit.mix zipfile_.mix zipup_.mix fileio_.mix globals.mix
  1868. X
  1869. zips:        zip.exe zipnote.exe zipsplit.exe ship.exe
  1870. X
  1871. zip.mix:    zip.h ziperr.h tailor.h revision.h zip.c
  1872. X    $(CC) $(CFLAGS) zip.c
  1873. X
  1874. zipfile.mix:    zip.h ziperr.h tailor.h zipfile.c
  1875. X    $(CC) $(CFLAGS) zipfile.c
  1876. X
  1877. zipup.mix:    zip.h ziperr.h tailor.h revision.h zipup.c
  1878. X    $(CC) $(CFLAGS) zipup.c
  1879. X
  1880. fileio.mix:    zip.h ziperr.h tailor.h fileio.c
  1881. X    $(CC) $(CFLAGS) fileio.c
  1882. X
  1883. util.mix:    zip.h ziperr.h tailor.h util.c
  1884. X    $(CC) $(CFLAGS) util.c
  1885. X
  1886. shrink.mix:    zip.h ziperr.h tailor.h shrink.c
  1887. X    $(CC) $(CFLAGS) shrink.c
  1888. X
  1889. globals.mix:    zip.h ziperr.h tailor.h globals.c
  1890. X    $(CC) $(CFLAGS) globals.c
  1891. X
  1892. zipnote.mix:    zip.h ziperr.h tailor.h revision.h zipnote.c
  1893. X    $(CC) $(CFLAGS) zipnote.c
  1894. X
  1895. zipsplit.mix: zipsplit.c zip.h ziperr.h tailor.h revision.h
  1896. X    $(CC) $(CFLAGS) zipsplit.c
  1897. X
  1898. implode.mix:    implode.h crypt.h ziperr.h tailor.h tempf.h implode.c
  1899. X    $(CC) $(CFLAGS) implode.c
  1900. X
  1901. tempf.mix:    tempf.h tailor.h tempf.c
  1902. X    $(CC) $(CFLAGS) tempf.c
  1903. X
  1904. im_lmat.mix:    implode.h crypt.h ziperr.h tailor.h im_lmat.c
  1905. X    $(CC) $(CFLAGS) im_lmat.c
  1906. X
  1907. im_ctree.mix:    implode.h crypt.h ziperr.h tailor.h tempf.h im_ctree.c
  1908. X    $(CC) $(CFLAGS) im_ctree.c
  1909. X
  1910. im_bits.mix:    implode.h crypt.h ziperr.h tailor.h im_bits.c
  1911. X    $(CC) $(CFLAGS) im_bits.c
  1912. X
  1913. zipfile_.mix: zipfile.c zip.h
  1914. X    +ren zipfile.c zipfile_.c
  1915. X    $(CC) /dUTIL $(CFLAGS) zipfile_.c
  1916. X    +ren zipfile_.c zipfile.c
  1917. X
  1918. zipup_.mix: zipup.c zip.h
  1919. X    +ren zipup.c zipup_.c
  1920. X    $(CC) /dUTIL $(CFLAGS) zipup_.c
  1921. X    +ren zipup_.c zipup.c
  1922. X
  1923. fileio_.mix: fileio.c zip.h
  1924. X    +ren fileio.c fileio_.c
  1925. X    $(CC) /dUTIL $(CFLAGS) fileio_.c
  1926. X    +ren fileio_.c fileio.c
  1927. X
  1928. X# we must cut the command line to fit in the MS/DOS 128 byte limit:
  1929. zip.exe: $(OBJZ1) $(OBJZ2) $(OBJI)
  1930. X    +echo L $(OBJZ1) > zip.rsp
  1931. X    +echo L $(OBJZ2) >> zip.rsp
  1932. X    +echo L $(OBJI) >> zip.rsp
  1933. X    +echo FA; >> zip.rsp
  1934. X    +echo b zip,,, >> zip.rsp
  1935. X    $(LD) $(LDFLAGS) @zip.rsp
  1936. X    rm zip.rsp
  1937. X    $(STRIP) zip.exe
  1938. X#    rm zip.old
  1939. X# Leave these "rm *.old" lines in if you have a shortage of diskspace.
  1940. X# Particularly if you intend to "make zips".
  1941. X
  1942. zipnote.exe: $(OBJN)
  1943. X    +echo L $(OBJN) > zipn.rsp
  1944. X    +echo FA; >> zipn.rsp
  1945. X    +echo b zipnote,,, >> zipn.rsp
  1946. X    $(LD) $(LDFLAGS) @zipn.rsp
  1947. X    rm zipn.rsp
  1948. X    $(STRIP) zipnote.exe
  1949. X#    rm zipnote.old
  1950. X
  1951. zipsplit.exe: $(OBJS)
  1952. X    +echo L $(OBJS) > zips.rsp
  1953. X    +echo FA; >> zips.rsp
  1954. X    +echo b zipsplit,,, >> zips.rsp
  1955. X    $(LD) $(LDFLAGS) @zips.rsp
  1956. X    rm zips.rsp
  1957. X    $(STRIP) zipsplit.exe
  1958. X#    rm zipsplit.old
  1959. X
  1960. ship.exe: ship.c
  1961. X    $(CC) $(CFLAGS) ship.c
  1962. X    $(LD) $(LDFLAGS) ship.mix
  1963. X    $(STRIP) ship.exe
  1964. X#    rm ship.old
  1965. END_OF_FILE
  1966. if test 3619 -ne `wc -c <'makefile.pwc'`; then
  1967.     echo shar: \"'makefile.pwc'\" unpacked with wrong size!
  1968. fi
  1969. # end of 'makefile.pwc'
  1970. fi
  1971. if test -f 'makevms.com' -a "${1}" != "-c" ; then 
  1972.   echo shar: Will not clobber existing file \"'makevms.com'\"
  1973. else
  1974. echo shar: Extracting \"'makevms.com'\" \(2470 characters\)
  1975. sed "s/^X//" >'makevms.com' <<'END_OF_FILE'
  1976. X$ !
  1977. X$ !     "Makefile" for VMS versions of Zip, ZipNote,
  1978. X$ !      ZipSplit, Ship and UnShip (stolen from Unzip)
  1979. X$ !
  1980. X$ set verify    ! like "echo on", eh?
  1981. X$ !
  1982. X$ !------------------------------- Zip section --------------------------------
  1983. X$ !
  1984. X$ cc /def=EXPORT zip,zipfile,zipup,fileio,util,tempf,shrink,globals,implode,im_lmat,im_ctree,im_bits
  1985. X$ link zip,zipfile,zipup,fileio,util,tempf,shrink,globals,implode,im_lmat,im_ctree,im_bits,sys$input:/opt
  1986. sys$share:vaxcrtl.exe/shareable
  1987. X$ !
  1988. X$ ! If you have problems with implode, compile with /define=noimplode
  1989. X$ ! and remove all the im* files from the above lines.
  1990. X$ !
  1991. X$ !-------------------------- Zip utilities section ---------------------------
  1992. X$ !
  1993. X$ ren zipfile.c zipfile_.c;*
  1994. X$ ren zipup.c zipup_.c;*
  1995. X$ ren fileio.c fileio_.c;*
  1996. X$ ren util.c util_.c;*
  1997. X$ cc /def=EXPORT zipnote, zipsplit
  1998. X$ cc /def=EXPORT /def=UTIL zipfile_, zipup_, fileio_, util_
  1999. X$ ren zipfile_.c zipfile.c;*
  2000. X$ ren zipup_.c zipup.c;*
  2001. X$ ren fileio_.c fileio.c;*
  2002. X$ ren util_.c util.c;*
  2003. X$ link zipnote, zipfile_, zipup_, fileio_, globals, sys$input:/opt
  2004. sys$share:vaxcrtl.exe/shareable
  2005. X$ link zipsplit, zipfile_, zipup_, fileio_, globals, sys$input:/opt
  2006. sys$share:vaxcrtl.exe/shareable
  2007. X$ !
  2008. X$ !--------------------------- Ship/UnShip section ----------------------------
  2009. X$ !
  2010. X$ cc ship
  2011. X$ link ship,sys$input:/opt
  2012. sys$share:vaxcrtl.exe/shareable
  2013. X$ !
  2014. X$ ! Create a hard link.  (To remove both files, delete the copy FIRST, then
  2015. X$ ! the original.  Otherwise, if original deleted first [copy says "no such
  2016. X$ ! file"], must use "set file/remove unship.exe;#" to get rid of the copy.
  2017. X$ ! Unlike in Unix, deleting the original ALWAYS destroys the data--but not
  2018. X$ ! the directory entry of the copy.)  Using a hard link saves disk space, by
  2019. X$ ! the way.  Note, however, that copying a hard link copies the data, not
  2020. X$ ! just the link.  Therefore, set up the link in the directory in which the
  2021. X$ ! executable is to reside, or else rename (move) the executables into the
  2022. X$ ! directory.
  2023. X$ !
  2024. X$ set file/enter=unship.exe ship.exe
  2025. X$ !
  2026. X$ !----------------------------- Symbols section ------------------------------
  2027. X$ !
  2028. X$ ! Set up symbols for the various executables.  Edit the example below,
  2029. X$ ! changing "pc" to "disk:[directory]" as appropriate, and uncomment
  2030. X$ ! (remove the exclamation marks).
  2031. X$ !
  2032. X$ ! zip        == "$pc:zip.exe"
  2033. X$ ! zipnote    == "$pc:zipnote.exe"
  2034. X$ ! zipsplit    == "$pc:zipsplit.exe"
  2035. X$ ! ship        == "$pc:ship.exe"
  2036. X$ ! unship    == "$pc:unship.exe"
  2037. X$ !
  2038. X$ set noverify
  2039. END_OF_FILE
  2040. if test 2470 -ne `wc -c <'makevms.com'`; then
  2041.     echo shar: \"'makevms.com'\" unpacked with wrong size!
  2042. fi
  2043. # end of 'makevms.com'
  2044. fi
  2045. if test -f 'revision.h' -a "${1}" != "-c" ; then 
  2046.   echo shar: Will not clobber existing file \"'revision.h'\"
  2047. else
  2048. echo shar: Extracting \"'revision.h'\" \(1198 characters\)
  2049. sed "s/^X//" >'revision.h' <<'END_OF_FILE'
  2050. X/*
  2051. X
  2052. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  2053. X Permission is granted to any individual or institution to use, copy, or
  2054. X redistribute this software so long as all of the original files are included
  2055. X unmodified, that it is not sold for profit, and that this copyright notice
  2056. X is retained.
  2057. X
  2058. X*/
  2059. X
  2060. X/*
  2061. X *  revision.h by Mark Adler.
  2062. X */
  2063. X
  2064. X#define REVISION 10
  2065. X#define REVDATE "29 September 1991"
  2066. X
  2067. X/* Copyright notice for binary executables--this notice only applies to
  2068. X * those (zip, zipcloak, zipsplit, and zipnote), not to this file
  2069. X * (revision.h).
  2070. X */
  2071. X
  2072. X#ifndef NOCPYRT
  2073. char *copyright[] = {
  2074. X"Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.",
  2075. X"Permission is granted to any individual or institution to use, copy, or",
  2076. X"redistribute this executable so long as it is not modified and that it is",
  2077. X"not sold for profit."
  2078. X};
  2079. char *disclaimer[] = {
  2080. X"",
  2081. X"LIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES ARE",
  2082. X"PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR",
  2083. X"IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES",
  2084. X"RESULTING FROM THE USE OF THIS SOFTWARE."
  2085. X};
  2086. X#endif /* !NOCPYRT */
  2087. END_OF_FILE
  2088. if test 1198 -ne `wc -c <'revision.h'`; then
  2089.     echo shar: \"'revision.h'\" unpacked with wrong size!
  2090. fi
  2091. # end of 'revision.h'
  2092. fi
  2093. if test -f 'ship.def' -a "${1}" != "-c" ; then 
  2094.   echo shar: Will not clobber existing file \"'ship.def'\"
  2095. else
  2096. echo shar: Extracting \"'ship.def'\" \(74 characters\)
  2097. sed "s/^X//" >'ship.def' <<'END_OF_FILE'
  2098. NAME WINDOWCOMPAT NEWFILES
  2099. DESCRIPTION 'encode/split/mail & decode files'
  2100. END_OF_FILE
  2101. if test 74 -ne `wc -c <'ship.def'`; then
  2102.     echo shar: \"'ship.def'\" unpacked with wrong size!
  2103. fi
  2104. # end of 'ship.def'
  2105. fi
  2106. if test -f 'tailor.h' -a "${1}" != "-c" ; then 
  2107.   echo shar: Will not clobber existing file \"'tailor.h'\"
  2108. else
  2109. echo shar: Extracting \"'tailor.h'\" \(3123 characters\)
  2110. sed "s/^X//" >'tailor.h' <<'END_OF_FILE'
  2111. X/* tailor.h -- Not copyrighted 1991 Mark Adler */
  2112. X
  2113. X/* const's are inconsistently used across ANSI libraries--kill for all
  2114. X   header files. */
  2115. X#define const
  2116. X
  2117. X
  2118. X/* Use prototypes and ANSI libraries if __STDC__ */
  2119. X#ifdef __STDC__
  2120. X#  ifndef PROTO
  2121. X#    define PROTO
  2122. X#  endif /* !PROTO */
  2123. X#  define MODERN
  2124. X#endif /* __STDC__ */
  2125. X
  2126. X
  2127. X/* Use prototypes and ANSI libraries if Silicon Graphics */
  2128. X#ifdef sgi
  2129. X#  ifndef PROTO
  2130. X#    define PROTO
  2131. X#  endif /* !PROTO */
  2132. X#  define MODERN
  2133. X#endif /* sgi */
  2134. X
  2135. X
  2136. X/* Define MSDOS for Turbo C as well as Microsoft C */
  2137. X#ifdef __POWERC                 /* For Power C too */
  2138. X#  define __TURBOC__
  2139. X#endif /* __POWERC */
  2140. X#ifdef __TURBOC__
  2141. X#  ifndef MSDOS
  2142. X#    define MSDOS
  2143. X#  endif /* !MSDOS */
  2144. X#endif /* __TURBOC__ */
  2145. X
  2146. X
  2147. X/* Use prototypes and ANSI libraries if Microsoft or Borland C */
  2148. X#ifdef MSDOS
  2149. X#  ifndef PROTO
  2150. X#    define PROTO
  2151. X#  endif /* !PROTO */
  2152. X#  define MODERN
  2153. X#endif /* MSDOS */
  2154. X
  2155. X
  2156. X/* Turn off prototypes if requested */
  2157. X#ifdef NOPROTO
  2158. X#  ifdef PROTO
  2159. X#    undef PROTO
  2160. X#  endif /* PROTO */
  2161. X#endif /* NOPROT */
  2162. X
  2163. X
  2164. X/* Used to remove arguments in function prototypes for non-ANSI C */
  2165. X#ifdef PROTO
  2166. X#  define OF(a) a
  2167. X#else /* !PROTO */
  2168. X#  define OF(a) ()
  2169. X#endif /* ?PROTO */
  2170. X
  2171. X
  2172. X/* Allow far and huge allocation for small model (Microsoft C or Turbo C) */
  2173. X#ifdef MSDOS
  2174. X#  ifdef __TURBOC__
  2175. X#    include <alloc.h>
  2176. X#  else /* !__TURBOC__ */
  2177. X#    include <malloc.h>
  2178. X#    define farmalloc _fmalloc
  2179. X#    define farfree   _ffree
  2180. X#  endif /* ?__TURBOC__ */
  2181. X#else /* !MSDOS */
  2182. X#  define huge
  2183. X#  define far
  2184. X#  define near
  2185. X#  define farmalloc malloc
  2186. X#  define farfree   free
  2187. X#endif /* ?MSDOS */
  2188. X
  2189. X
  2190. X/* Define MSVMS if either MSDOS or VMS defined */
  2191. X#ifdef MSDOS
  2192. X#  define MSVMS
  2193. X#else /* !MSDOS */
  2194. X#  ifdef VMS
  2195. X#    define MSVMS
  2196. X#  endif /* VMS */
  2197. X#endif /* ?MSDOS */
  2198. X
  2199. X
  2200. X/* Define void, voidp, and extent (size_t) */
  2201. X#include <stdio.h>
  2202. X#ifdef MODERN
  2203. X#  ifndef M_XENIX
  2204. X#    include <stddef.h>
  2205. X#  endif /* !M_XENIX */
  2206. X#  include <stdlib.h>
  2207. X   typedef size_t extent;
  2208. X   typedef void voidp;
  2209. X#else /* !MODERN */
  2210. X   typedef unsigned int extent;
  2211. X#  define void int
  2212. X   typedef char voidp;
  2213. X#endif /* ?MODERN */
  2214. X
  2215. X/* Get types and stat */
  2216. X#ifdef VMS
  2217. X#  include <types.h>
  2218. X#  include <stat.h>
  2219. X#else /* !VMS */
  2220. X#  include <sys/types.h>
  2221. X#  include <sys/stat.h>
  2222. X#endif /* ?VMS */
  2223. X
  2224. X
  2225. X/* Cheap fix for unlink on VMS */
  2226. X#ifdef VMS
  2227. X#  define unlink delete
  2228. X#endif /* VMS */
  2229. X
  2230. X
  2231. X/* For Pyramid */
  2232. X#ifdef pyr
  2233. X#  define strrchr rindex
  2234. X#  define ZMEM
  2235. X#endif /* pyr */
  2236. X
  2237. X
  2238. X/* File operations--use "b" for binary if allowed */
  2239. X#ifdef MODERN
  2240. X#  define FOPR "rb"
  2241. X#  define FOPM "r+b"
  2242. X#  define FOPW "w+b"
  2243. X#else /* !MODERN */
  2244. X#  define FOPR "r"
  2245. X#  define FOPM "r+"
  2246. X#  define FOPW "w+"
  2247. X#endif /* ?MODERN */
  2248. X
  2249. X
  2250. X/* Fine tuning */
  2251. X#ifndef MSDOS
  2252. X#   define BSZ 8192   /* Buffer size for files */
  2253. X#else /* !MSDOS */
  2254. X#   define BSZ 4096   /* Keep precious NEAR space */
  2255. X    /* BSZ can't be 8192 even for compact model because of 64K limitation
  2256. X     * in im_lmat.c. If you run out of memory when processing a large number
  2257. X     * files, use the compact model and reduce BSZ to 2048 here and in
  2258. X     * im_lm.asm.
  2259. X     */
  2260. X#endif /* ?MSDOS */
  2261. X
  2262. X/* end of tailor.h */
  2263. END_OF_FILE
  2264. if test 3123 -ne `wc -c <'tailor.h'`; then
  2265.     echo shar: \"'tailor.h'\" unpacked with wrong size!
  2266. fi
  2267. # end of 'tailor.h'
  2268. fi
  2269. if test -f 'tempf.c' -a "${1}" != "-c" ; then 
  2270.   echo shar: Will not clobber existing file \"'tempf.c'\"
  2271. else
  2272. echo shar: Extracting \"'tempf.c'\" \(4437 characters\)
  2273. sed "s/^X//" >'tempf.c' <<'END_OF_FILE'
  2274. X/*
  2275. X
  2276. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  2277. X Permission is granted to any individual or institution to use, copy, or
  2278. X redistribute this software so long as all of the original files are included
  2279. X unmodified, that it is not sold for profit, and that this copyright notice
  2280. X is retained.
  2281. X
  2282. X*/
  2283. X
  2284. X/*
  2285. X *  tempf.c by Mark Adler.
  2286. X */
  2287. X
  2288. X#include "tailor.h"
  2289. X#include "tempf.h"
  2290. X
  2291. extern char *tempname OF((int));
  2292. X
  2293. X#ifdef MODERN
  2294. X#  include <string.h>
  2295. X#else /* !MODERN */
  2296. X   voidp *malloc();
  2297. X#  ifndef ZMEM
  2298. X     char *memcpy();
  2299. X#  endif /* !ZMEM */
  2300. X#endif /* ?MODERN */
  2301. X#ifdef ZMEM
  2302. X   char *memcpy OF((char *, char *, unsigned int));
  2303. X#endif /* ZMEM */
  2304. int unlink OF((char *));
  2305. X
  2306. X
  2307. X/* Define a special memcpy for MSDOS small model */
  2308. X#if defined(MSDOS) && (defined(M_I86SM) || defined(__SMALL__))
  2309. X#  include <dos.h>
  2310. X#  define memcpy farmemcpy
  2311. X   void farmemcpy(char far *d, char far *s, unsigned n)
  2312. X   {
  2313. X      movedata(FP_SEG(s), FP_OFF(s), FP_SEG(d), FP_OFF(d), n);
  2314. X   }
  2315. X#endif
  2316. X
  2317. X
  2318. tFILE *topen(c)
  2319. int c;
  2320. X/* Create a new temporary file and return its descriptor.  Save the character
  2321. X   c to be used in the temporary file name, if needed. */
  2322. X{
  2323. X  tFILE *t;
  2324. X
  2325. X  if ((t = (tFILE *)malloc(sizeof(tFILE))) == NULL ||
  2326. X      (t->b = farmalloc(TMPSIZ)) == NULL)
  2327. X    return NULL;
  2328. X  t->p = t->m = 0;
  2329. X  t->c = c;
  2330. X  t->f = NULL;
  2331. X  return t;
  2332. X}
  2333. X
  2334. X
  2335. int tnew(t)
  2336. tFILE *t;               /* temporary file descriptor */
  2337. X/* Create a temporary file with a unique name */
  2338. X{
  2339. X  return (t->n = tempname(t->c)) == NULL ||
  2340. X         (t->f = fopen(t->n, FOPW)) == NULL;
  2341. X}
  2342. X
  2343. X
  2344. unsigned twrite(b, s, n, t)
  2345. char *b;                /* buffer to write from */
  2346. unsigned s;             /* size of items */
  2347. unsigned n;             /* number of items */
  2348. tFILE *t;               /* temporary file descriptor */
  2349. X/* Like fwrite()--will create a temporary file if needed. */
  2350. X{
  2351. X  unsigned j;           /* room in memory, items to write */
  2352. X  long k;               /* bytes to write */
  2353. X  long w;               /* bytes written to file */
  2354. X
  2355. X  /* write to memory portion */
  2356. X  j = TMPSIZ - t->p;
  2357. X  k = s * (long) n;
  2358. X  if (j && k)
  2359. X  {
  2360. X    j = (long)j > k ? (unsigned)k : j;
  2361. X    memcpy(t->b + t->p, (char far *)b, j);
  2362. X    t->p += j;
  2363. X    if (t->m < t->p)
  2364. X      t->m = t->p;
  2365. X    b += j;
  2366. X    k -= j;
  2367. X  }
  2368. X  if (k == 0)
  2369. X    return n;
  2370. X
  2371. X  /* create temporary file if needed */
  2372. X  if (t->f == NULL && tnew(t))
  2373. X    return 0;
  2374. X
  2375. X  /* write to temporary file */
  2376. X  j = (unsigned)(k / s);
  2377. X  if (j && fwrite(b, s, j, t->f) != j)
  2378. X    return 0;
  2379. X  b += w = s * (long)j;
  2380. X  k -= w;
  2381. X  if (k && fwrite(b, (unsigned)k, 1, t->f) != 1)
  2382. X    return 0;
  2383. X  return n;
  2384. X}
  2385. X
  2386. X
  2387. int tflush(t)
  2388. tFILE *t;               /* temporary file descriptor */
  2389. X/* Like fflush() */
  2390. X{
  2391. X  return t->f == NULL ? 0 : fflush(t->f);
  2392. X}
  2393. X
  2394. X
  2395. void trewind(t)
  2396. tFILE *t;               /* temporary file descriptor */
  2397. X/* Like rewind() */
  2398. X{
  2399. X  t->p = 0;
  2400. X  if (t->f != NULL)
  2401. X    rewind(t->f);
  2402. X}
  2403. X
  2404. X
  2405. unsigned tread(b, s, n, t)
  2406. char *b;                /* buffer to read into */
  2407. unsigned s;             /* size of items */
  2408. unsigned n;             /* number of items */
  2409. tFILE *t;               /* temporary file descriptor */
  2410. X/* Like fread() */
  2411. X{
  2412. X  unsigned j;           /* bytes in memory, items to read */
  2413. X  long k;               /* bytes requested */
  2414. X  long r;               /* bytes read from file */
  2415. X
  2416. X  /* read from memory */
  2417. X  j = t->m - t->p;
  2418. X  k = s * (long)n;
  2419. X  if (j && k)
  2420. X  {
  2421. X    j = (long)j > k ? (unsigned)k : j;
  2422. X    memcpy((char far *)b, t->b + t->p, j);
  2423. X    t->p += j;
  2424. X    b += j;
  2425. X    k -= j;
  2426. X  }
  2427. X
  2428. X  /* read from file if more requested */
  2429. X  if (k && t->f != NULL)
  2430. X  {
  2431. X    j = (unsigned)(k / s);
  2432. X    if (j)
  2433. X    {
  2434. X      r = s * (long)fread(b, s, j, t->f);
  2435. X      b += r;
  2436. X      k -= r;
  2437. X    }
  2438. X    if (k && k < s)
  2439. X      k -= fread(b, 1, (unsigned)k, t->f);
  2440. X  }
  2441. X
  2442. X  /* return complete items read */
  2443. X  return n - (unsigned)((k + s - 1) / s);
  2444. X}
  2445. X
  2446. X
  2447. int terror(t)
  2448. tFILE *t;               /* temporary file descriptor */
  2449. X/* Like ferror() */
  2450. X{
  2451. X  return t->f == NULL ? 0 : ferror(t->f);
  2452. X}
  2453. X
  2454. X
  2455. int teof(t)
  2456. tFILE *t;               /* temporary file descriptor */
  2457. X/* Like feof() */
  2458. X{
  2459. X  return t->f == NULL ? t->p == t->m : feof(t->f);
  2460. X}
  2461. X
  2462. X
  2463. int tclose(t)
  2464. tFILE *t;               /* temporary file descriptor */
  2465. X/* Like fclose()--frees the memory used by the descriptor and deletes
  2466. X   the temporary file, if any. */
  2467. X{
  2468. X  int r;
  2469. X
  2470. X  r = 0;
  2471. X  if (t->f != NULL)
  2472. X  {
  2473. X    r = fclose(t->f);
  2474. X    unlink(t->n);
  2475. X    free(t->n);
  2476. X  }
  2477. X  farfree(t->b);
  2478. X  free(t);
  2479. X  return r;
  2480. X}
  2481. END_OF_FILE
  2482. if test 4437 -ne `wc -c <'tempf.c'`; then
  2483.     echo shar: \"'tempf.c'\" unpacked with wrong size!
  2484. fi
  2485. # end of 'tempf.c'
  2486. fi
  2487. if test -f 'tempf.h' -a "${1}" != "-c" ; then 
  2488.   echo shar: Will not clobber existing file \"'tempf.h'\"
  2489. else
  2490. echo shar: Extracting \"'tempf.h'\" \(2182 characters\)
  2491. sed "s/^X//" >'tempf.h' <<'END_OF_FILE'
  2492. X/*
  2493. X
  2494. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  2495. X Permission is granted to any individual or institution to use, copy, or
  2496. X redistribute this software so long as all of the original files are included
  2497. X unmodified, that it is not sold for profit, and that this copyright notice
  2498. X is retained.
  2499. X
  2500. X*/
  2501. X
  2502. X/*
  2503. X *  tempf.h by Mark Adler.
  2504. X */
  2505. X
  2506. X/* These "t" functions behave like their "f" counterparts, except that
  2507. X   topen() takes one character to (possibly) be used in a temporary file
  2508. X   name, twrite() can create a temporary file, and tclose() will delete
  2509. X   the temporary file, if any.  tnew() is only defined for use in the
  2510. X   tputc() macro.  It should not be called explicitly.  These functions
  2511. X   use the type tFILE instead of FILE to point to a file descriptor. */
  2512. X
  2513. X#if !defined(OS2) && (defined(M_I86CM) || defined(__COMPACT__))
  2514. X#   define TMPSIZ  0x8000  /* memory portion of temporary files */
  2515. X    /* The MSDOS compact model is to be used only for processing a large
  2516. X     * number of files. In this case we try to reduce the memory requirements.
  2517. X     * You can reduce TMPSIZ to 16384 or 8192 if 32K is still too large,
  2518. X     * but the resulting code will be slower.
  2519. X     */
  2520. X#else
  2521. X#   define TMPSIZ  0xe000  /* memory portion of temporary files */
  2522. X#endif
  2523. X
  2524. typedef struct {
  2525. X  char far *b;          /* memory part of file */
  2526. X  unsigned p;           /* current read/write pointer for memory part */
  2527. X  unsigned m;           /* bytes in memory part */
  2528. X  int c;                /* character to use in spill file name */
  2529. X  FILE *f;              /* spill file pointer or NULL*/
  2530. X  char *n;              /* spill file name if f not NULL */
  2531. X} tFILE;
  2532. X
  2533. tFILE *topen OF((int));
  2534. int tnew OF((tFILE *));
  2535. unsigned twrite OF((char *, unsigned, unsigned, tFILE *));
  2536. int tflush OF((tFILE *));
  2537. void trewind OF((tFILE *));
  2538. unsigned tread OF((char *, unsigned, unsigned, tFILE *));
  2539. int terror OF((tFILE *));
  2540. int teof OF((tFILE *));
  2541. int tclose OF((tFILE *));
  2542. X
  2543. X#define tputcm(c,t) ((t)->b[(t)->p++]=(c),(t)->m<(t)->p?((t)->m=(t)->p):0,c)
  2544. X#define tputcf(c,t) ((t)->f==NULL?(tnew(t)?-1:putc(c,(t)->f)):putc(c,(t)->f))
  2545. X#define tputc(c,t) ((t)->p<TMPSIZ?(int)tputcm(c,t):tputcf(c,t))
  2546. END_OF_FILE
  2547. if test 2182 -ne `wc -c <'tempf.h'`; then
  2548.     echo shar: \"'tempf.h'\" unpacked with wrong size!
  2549. fi
  2550. # end of 'tempf.h'
  2551. fi
  2552. if test -f 'zip.def' -a "${1}" != "-c" ; then 
  2553.   echo shar: Will not clobber existing file \"'zip.def'\"
  2554. else
  2555. echo shar: Extracting \"'zip.def'\" \(86 characters\)
  2556. sed "s/^X//" >'zip.def' <<'END_OF_FILE'
  2557. NAME WINDOWCOMPAT NEWFILES
  2558. DESCRIPTION 'The world-famous zip utilities from Info-ZIP'
  2559. END_OF_FILE
  2560. if test 86 -ne `wc -c <'zip.def'`; then
  2561.     echo shar: \"'zip.def'\" unpacked with wrong size!
  2562. fi
  2563. # end of 'zip.def'
  2564. fi
  2565. if test -f 'zip.prj' -a "${1}" != "-c" ; then 
  2566.   echo shar: Will not clobber existing file \"'zip.prj'\"
  2567. else
  2568. echo shar: Extracting \"'zip.prj'\" \(620 characters\)
  2569. sed "s/^X//" >'zip.prj' <<'END_OF_FILE'
  2570. zip.c        (zip.h ziperr.h tailor.h revision.h)
  2571. zipfile.c    (zip.h ziperr.h tailor.h)
  2572. zipup.c      (zip.h ziperr.h tailor.h revision.h)
  2573. fileio.c     (zip.h ziperr.h tailor.h)
  2574. util.c       (zip.h ziperr.h tailor.h)
  2575. tempf.c      (tempf.h tailor.h)
  2576. shrink.c     (zip.h ziperr.h tempf.h tailor.h)
  2577. crypt.c      (zip.h ziperr.h tailor.h)
  2578. globals.c    (zip.h ziperr.h tailor.h)
  2579. implode.c    (implode.h crypt.h ziperr.h tempf.h tailor.h)
  2580. im_lmat.c    (implode.h crypt.h ziperr.h tempf.h tailor.h)
  2581. im_ctree.c   (implode.h crypt.h ziperr.h tempf.h tailor.h)
  2582. im_bits.c    (implode.h crypt.h ziperr.h tempf.h tailor.h)
  2583. im_lm.obj
  2584. END_OF_FILE
  2585. if test 620 -ne `wc -c <'zip.prj'`; then
  2586.     echo shar: \"'zip.prj'\" unpacked with wrong size!
  2587. fi
  2588. # end of 'zip.prj'
  2589. fi
  2590. if test -f 'ziperr.h' -a "${1}" != "-c" ; then 
  2591.   echo shar: Will not clobber existing file \"'ziperr.h'\"
  2592. else
  2593. echo shar: Extracting \"'ziperr.h'\" \(2561 characters\)
  2594. sed "s/^X//" >'ziperr.h' <<'END_OF_FILE'
  2595. X/*
  2596. X
  2597. X Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, and Jean-loup Gailly.
  2598. X Permission is granted to any individual or institution to use, copy, or
  2599. X redistribute this software so long as all of the original files are included
  2600. X unmodified, that it is not sold for profit, and that this copyright notice
  2601. X is retained.
  2602. X
  2603. X*/
  2604. X
  2605. X/*
  2606. X *  ziperr.h by Mark Adler.
  2607. X */
  2608. X
  2609. X/* Error return values.  The values 0..4 and 12..18 follow the conventions
  2610. X   of PKZIP.   The values 4..10 are all assigned to "insufficient memory"
  2611. X   by PKZIP, so the codes 5..10 are used here for other purposes. */
  2612. X#define ZE_MISS         -1      /* used by procname(), zipbare() */
  2613. X#define ZE_OK           0       /* success */
  2614. X#define ZE_EOF          2       /* unexpected end of zip file */
  2615. X#define ZE_FORM         3       /* zip file structure error */
  2616. X#define ZE_MEM          4       /* out of memory */
  2617. X#define ZE_LOGIC        5       /* internal logic error (implode) */
  2618. X#define ZE_BIG          6       /* entry too large to split */
  2619. X#define ZE_NOTE         7       /* invalid comment format */
  2620. X#define ZE_ABORT        9       /* user interrupt or termination */
  2621. X#define ZE_TEMP         10      /* error using a temp file */
  2622. X#define ZE_READ         11      /* read or seek error */
  2623. X#define ZE_NONE         12      /* nothing to do */
  2624. X#define ZE_NAME         13      /* missing or empty zip file */
  2625. X#define ZE_WRITE        14      /* error writing to a file */
  2626. X#define ZE_CREAT        15      /* couldn't open to write */
  2627. X#define ZE_PARMS        16      /* bad command line */
  2628. X#define ZE_OPEN         18      /* could not open a specified file to read */
  2629. X/* Macro to determine whether to call perror() or not */
  2630. X#define PERR(e) (e==ZE_READ||e==ZE_WRITE||e==ZE_CREAT||e==ZE_TEMP||e==ZE_OPEN)
  2631. X
  2632. X#ifdef GLOBALS
  2633. X/* Error messages for the err() function in the zip programs */
  2634. char *errors[] = {
  2635. X/*  1 */  "",
  2636. X/*  2 */  "Unexpected end of zip file",
  2637. X/*  3 */  "Zip file structure invalid",
  2638. X/*  4 */  "Out of memory",
  2639. X/*  5 */  "Internal logic error",
  2640. X/*  6 */  "Entry too big to split",
  2641. X/*  7 */  "Invalid comment format",
  2642. X/*  8 */  "",
  2643. X/*  9 */  "Interrupted",
  2644. X/* 10 */  "Temporary file failure",
  2645. X/* 11 */  "Input file read failure",
  2646. X/* 12 */  "Nothing to do!",
  2647. X/* 13 */  "Missing or empty zip file",
  2648. X/* 14 */  "Output file write failure",
  2649. X/* 15 */  "Could not create output file",
  2650. X/* 16 */  "Invalid command arguments",
  2651. X/* 17 */  "",
  2652. X/* 18 */  "File not found or no read permission",
  2653. X};
  2654. X#else /* !GLOBALS */
  2655. extern char *errors[];          /* Error messages for err() */
  2656. X#endif /* ?GLOBALS */
  2657. END_OF_FILE
  2658. if test 2561 -ne `wc -c <'ziperr.h'`; then
  2659.     echo shar: \"'ziperr.h'\" unpacked with wrong size!
  2660. fi
  2661. # end of 'ziperr.h'
  2662. fi
  2663. echo shar: End of archive 1 \(of 7\).
  2664. cp /dev/null ark1isdone
  2665. MISSING=""
  2666. for I in 1 2 3 4 5 6 7 ; do
  2667.     if test ! -f ark${I}isdone ; then
  2668.     MISSING="${MISSING} ${I}"
  2669.     fi
  2670. done
  2671. if test "${MISSING}" = "" ; then
  2672.     echo You have unpacked all 7 archives.
  2673.     rm -f ark[1-9]isdone
  2674. else
  2675.     echo You still need to unpack the following archives:
  2676.     echo "        " ${MISSING}
  2677. fi
  2678. ##  End of shell archive.
  2679. exit 0
  2680.